On Wednesday, August 28, 2019 at 5:44:29 AM UTC-7, Nicolò Benigni wrote: > > I have a Rails app with 4 years of migrations and everytime I start a new > machine and try to run them all they give ton of errors. > So I usually use rake db:schema:load but would prefer to "squash" togheter > all my migrations to have a fresh start. > > Does anyone have experience on something like this? > I think I could use this: > https://github.com/jeremyevans/sequel/blob/master/doc/migration.rdoc#dumping-the-current-schema-as-a-migration > > Am I missing something important or do anyone have better suggestion? >
You can use that approach if it results in the same schema. I would definitely check that by dumping the schema using that approach with the database's dump tool and comparing it with the output of the expected schema. There are a lot of things that the schema dumper can't handle (database permissions, functions, etc.). Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/9d6202ee-95ee-4c7d-8186-5bd6900361e5%40googlegroups.com.
