Basic function and trigger migrations#915
Merged
sdepold merged 7 commits intosequelize:masterfrom Sep 27, 2013
Merged
Conversation
Added the ability to define migrations that create, drop, and rename both functions and triggers (since triggers need functions). This allows migrations to handle more of the requirements of setting up the underlying SQL database behavior. This version currently only provides support on postgresql.
…d_trigger_migrations
…basic_function_and_trigger_migrations
Member
|
@durango opinion? |
Member
|
@sdepold looks ok to me :) except for the style guidelines / semicolons, but other than that its fine but the tests do need to pass still :) |
Contributor
Author
Contributor
Author
|
OK, I have fixed the failing tests, which were actually problems in the test logic not the code--bad query to determine if the function is in the catalog table. In addition, I tried to match the style guidelines. All of my code passes the jshint validations as they exist in the .jshintrc and I removed the semicolons everywhere. I think I am following the rest of the guidelines from the README but if not let me know. |
sdepold
added a commit
that referenced
this pull request
Sep 27, 2013
…rations Basic function and trigger migrations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added the ability to create, rename, or drop functions and create, rename, and drop triggers in migrations [postgresql only for now].
It is now possible to do more DDL work in migrations specifically around creating, renaming, or deleting fuctions, and creating, renaming, and dropping triggers. The goal was to be able to handle more of the database schema through migrations by allowing more of the constraint capabilities exposed. Functions were required for postgresql to be able to create triggers.
This feature was only implemented and tests created for postgresql as that was the database engine I was working with and could test. The rest of the supported engines will get unsupported migration messages if used.