Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto migrate from old schema by checking autoMigrateOldSchema option #84

Merged

Conversation

cusspvz
Copy link

@cusspvz cusspvz commented Jan 19, 2015

closes #82

José Moreira added 3 commits January 19, 2015 19:44
- support/helpers.getTestConfig - add support to mixing configs
- db/migrate/old_schema.test
  - add support to supply configs on prepare and prepareLegacyScenario
  - Add test for autoMigrateOldSchema option
should return a Promise instance
@cusspvz
Copy link
Author

cusspvz commented Jan 20, 2015

Ready for code review! Hope to be everything as you expected. :)

Edit: If you don't mind, i would ask you to warn me on next version release so we can continue our work internally with our sysadmin. :)

@cusspvz
Copy link
Author

cusspvz commented Jan 20, 2015

Seems that the test i made is intermittent on sqlite dialect. Could you please check what could be the cause?

@sdepold
Copy link
Member

sdepold commented Jan 21, 2015

Let me check

@sdepold
Copy link
Member

sdepold commented Jan 21, 2015

Hm it works nicely on my local machine ... I just triggered another build for sqlite

@sdepold
Copy link
Member

sdepold commented Jan 21, 2015

Works :)

}, function () { done(); });
});

it("shouldn't enforce if we provide autoMigrateOldSchema option", function (done) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a check before and after the migration, that ensures the previously old table structure is now the new one?

@sdepold
Copy link
Member

sdepold commented Jan 21, 2015

Besides the little note about the test everything looks good :) Thanks a lot!

- Check if SequelizeMeta has changed fields
@cusspvz
Copy link
Author

cusspvz commented Jan 21, 2015

Hm it works nicely on my local machine ... I just triggered another build for sqlite

Locally it worked flawless also, but since it has failed on Travis, I've supposed that it was intermittent.

Besides the little note about the test everything looks good :) Thanks a lot!

Nice to ear that! I've already added checks for SequelizeMeta table schema.
Thank you for making sequelize! :)

Ready to merge.

@sdepold
Copy link
Member

sdepold commented Jan 21, 2015

nice!

sdepold added a commit that referenced this pull request Jan 21, 2015
Auto migrate from old schema by checking autoMigrateOldSchema option
@sdepold sdepold merged commit cbb341b into sequelize:master Jan 21, 2015
@sdepold
Copy link
Member

sdepold commented Jan 21, 2015

just released 1.0.5

@cusspvz
Copy link
Author

cusspvz commented Jan 21, 2015

That was fast as hell!!!
Thank you once again! :D

@sdepold
Copy link
Member

sdepold commented Jan 21, 2015

Thank you! btw. I added some words about that topic to the readme file

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 5afbf55 on cusspvz:patch/allow_old_migration_by_forcing into * on sequelize:master*.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 5afbf55 on cusspvz:patch/allow_old_migration_by_forcing into * on sequelize:master*.

codetriage-readme-bot pushed a commit to codetriage-readme-bot/cli that referenced this pull request Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shouldn't db:migrate detect old_schema and convert table automatically?
3 participants