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

Triggers at the beginning of schema, before tables created #70

Open
sportsbook123 opened this issue Nov 30, 2017 · 1 comment
Open

Triggers at the beginning of schema, before tables created #70

sportsbook123 opened this issue Nov 30, 2017 · 1 comment

Comments

@sportsbook123
Copy link

When I dump a schema for a DB with some triggers on some tables, them triggers are added at the top of the schema.rb file before the table definitions. When trying to load the schema it throws errors for the missing tables.

Any way around this? Basically need to be able to specify triggers should go last in the schema file.

@jenseng
Copy link
Owner

jenseng commented Feb 8, 2019

Hi @sportsbook123, I haven't seen this issue before. The triggers are added at the very end of the schema dumping code by extending the trailer method (which normally just outputs the end)

Anything unusual happening in your environment or other details you could provide, e.g. rails version, Gemfile, whether you use multiple dbs, etc.?

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

No branches or pull requests

2 participants