-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Feature Request] New migration strategy: "create" #5580
Comments
dmarcelino
changed the title
[Feature Request] Migration strategy: alter-safe
[Feature Request] New migration strategy: "create"
Feb 21, 2015
dmarcelino
referenced
this issue
in dmarcelino/waterline
Feb 23, 2015
dmarcelino
referenced
this issue
in dmarcelino/waterline-adapter-tests
Feb 23, 2015
@mikermcneil, @particlebanana, I've submitted PR #853 (tests in PR balderdashy/waterline-adapter-tests#34) with my vision for a |
particlebanana
referenced
this issue
in balderdashy/waterline
Mar 11, 2015
#846: add migration strategy `create`
merged |
Thanks! |
dmarcelino
referenced
this issue
in dmarcelino/sails-docs
Mar 11, 2015
Documentation for balderdashy/waterline#846
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I've started to play with "migratable" interface on waterline-orientdb and one of the things I've noticed is that "migratable" doesn't have an option to "safely alter" the database. By this I mean not performing any destructive operations (drops) but creating any tables/columns (through
define()
/addAttribute()
) that were added to the schema. I believe such strategy would make sense, even in production as most times we want new tables/columns to be added. The advantage of such strategy in production is reducing manual intervention (which is error prone).To give an example from real life, in my previous job (a multinational bank), we would rarely drop tables or delete columns from shared databases (few would bother with the risk, bureaucracy, chasing other teams, etc) but we would frequently add tables and columns.
I suggest we add a new strategy called
create
that will only perform the additive operations. I say "we" as I don't mind contributing to this provided the maintainers agree to the change.Tasks:
create
Newly-created hbs sails app fails onsails raise
. #853create
#846: adds tests for migration strategycreate
waterline-adapter-tests#34'create'
is added to Sails.js, update https://github.com/balderdashy/sails-docs/blob/master/concepts/ORM/model-settings.mdPS: I've searched for this in the issues but couldn't find anything, if there is an issue on the same topic redirect me and I'll comment there.
PPS: Initially I called this strategy "alter-safe" but after sleeping on it (literally) I arrived to the conclusion that "create" is a better name and falls in nicely with the other strategies :
drop
,alter
,create
,safe
.The text was updated successfully, but these errors were encountered: