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

Basic function and trigger migrations #915

merged 7 commits into from Sep 27, 2013


3 participants

jonathana commented Sep 17, 2013

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.

jonathana added some commits Aug 20, 2013

Add basic function and trigger migrations
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.

This comment has been minimized.


sdepold commented Sep 20, 2013

@durango opinion?


This comment has been minimized.


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


This comment has been minimized.


jonathana commented Sep 22, 2013

@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.


This comment has been minimized.


jonathana commented Sep 23, 2013

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

Merge pull request #915 from jonathana/basic_function_and_trigger_mig…

Basic function and trigger migrations

@sdepold sdepold merged commit 4eb4237 into sequelize:master Sep 27, 2013

1 check passed

default The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment