One issue I stumble on often is Postgres sql dependencies for advanced structure and rails migrations.
Scenic is helpful if its just views, but.... I actually think its approach can get in the way after you have something_vw_56.sql...
What would be REALLY helpful is if rails had built-in-hooks to just specify sql code that can run either:
- before the migration sequence
- after the migration sequence
- before a schema load (but after database creation)
- after schema load
- around a migration that has a particular tag associated with it (so you can drop specific materialized views, indexes, and recreate them only for a particular migration, and not on every single migration).