hair_trigger
hair_trigger copied to clipboard
Triggers at the beginning of schema, before tables created
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.
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.?