Skip to content

Basic function and trigger migrations#915

Merged
sdepold merged 7 commits intosequelize:masterfrom
jonathana:basic_function_and_trigger_migrations
Sep 27, 2013
Merged

Basic function and trigger migrations#915
sdepold merged 7 commits intosequelize:masterfrom
jonathana:basic_function_and_trigger_migrations

Conversation

@jonathana
Copy link
Copy Markdown
Contributor

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.

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.
@sdepold
Copy link
Copy Markdown
Member

sdepold commented Sep 20, 2013

@durango opinion?

@durango
Copy link
Copy Markdown
Member

durango commented Sep 21, 2013

@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 :)

@jonathana
Copy link
Copy Markdown
Contributor Author

@durango, @sdepold thank you for the feedback. I will match the style guidelines and look at the test failures. I thought everything I touched was clean, but I will double check what's going on.

@jonathana
Copy link
Copy Markdown
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
@sdepold sdepold merged commit 4eb4237 into sequelize:master Sep 27, 2013
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.

3 participants