node-sql-migrations icon indicating copy to clipboard operation
node-sql-migrations copied to clipboard

Migrations are not working after the first time

Open wasa4587 opened this issue 6 years ago • 1 comments

Migrations are not working after the first time

migrations id property is BIGINT

this returns migration.match(/^(\d+)/)[0]; a string

so this appliedMigrationIds.indexOf(id) is equals -1

Screen Shot 2019-06-05 at 1 14 20 PM

Screen Shot 2019-06-05 at 1 14 36 PM

please check my PR https://github.com/aaronabramov/node-sql-migrations/pull/17

wasa4587 avatar Jun 05 '19 18:06 wasa4587

Hey, The same issue is also with me. I am working with dynamic databases. I've created runtime databases as per the requirements. and every time i work with this i need to create a new database even to test .

With the new database migration works well as Godlike. but if we want to execute the migration for the old databases it shows me everything AOK in the console.

and There is one more thing which I have observed each time when i am executing the migration, the migrations table is getting redundant data for the migrations executed every time.

I'd like to suggest the team that we can create a batch like migration system. that every time it getting executed so there can be a file which can be possibly fast and feasible way to get all the migrations executes as per the requirements.

You guys are doing a great job. Please let me know if I can help.

AnshhKingg avatar Jun 17 '19 10:06 AnshhKingg