-
Notifications
You must be signed in to change notification settings - Fork 23
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
Skip automigrating for existing tables #705
Conversation
I don't how it works if a table is configured as keep_tables on yaml file, and there are new columns should be added, or some old columns should be dropped. let's waiting for @peterlimg to review |
Drop all tables and automigrate schema only if automigration is set to true or database is newly created
Codecov Report
@@ Coverage Diff @@
## staging #705 +/- ##
========================================
Coverage 24.06% 24.06%
========================================
Files 69 69
Lines 7957 7957
========================================
Hits 1915 1915
Misses 5757 5757
Partials 285 285
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Version info can be used in comming version to atleast effectively migrate database
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you have some misunderstand about AutoMigrate
on schema. why a table has to be dropped before migrating its schema? nobody will drop table to loss all data when it is migrated. I can't understand your idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Manual system tests [success] with the following config
|
Fixes
This PR add version table so that we can later on migrate tables and its data based on this information.
Also, the automigration will drop tables only if
automigration: true
, default value isfalse
.