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

[Feature Request] New migration strategy: "create" #5580

Closed
2 of 4 tasks
dmarcelino opened this issue Feb 20, 2015 · 3 comments
Closed
2 of 4 tasks

[Feature Request] New migration strategy: "create" #5580

dmarcelino opened this issue Feb 20, 2015 · 3 comments

Comments

@dmarcelino
Copy link
Member

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:

PS: 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.

@dmarcelino 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-adapter-tests Feb 23, 2015
@dmarcelino
Copy link
Member Author

@mikermcneil, @particlebanana, I've submitted PR #853 (tests in PR balderdashy/waterline-adapter-tests#34) with my vision for a create strategy. Let me know what you think. Thanks!

particlebanana referenced this issue in balderdashy/waterline Mar 11, 2015
#846: add migration strategy `create`
@particlebanana
Copy link
Contributor

merged

@dmarcelino
Copy link
Member Author

Thanks!

dmarcelino referenced this issue in dmarcelino/sails-docs Mar 11, 2015
Documentation for balderdashy/waterline#846
@raqem raqem transferred this issue from balderdashy/waterline May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants