Migrations question

I started working on an app. It’s new at this point so backing up
wouldn’t be difficult, however I’m wondering if there is some plugin
that exists where I can use it to grab the current database (set up
without migrations) and create a migration file ?
Sort of grab a current snapshot of the database and use that as a
stating point for my migrations directory.


You could always just copy your db/schema.rb file and use that as the
basis for a new migration file if needed. But you also should look at
the rake tasks Rails gives you. From your app directory, run rake -T

You’ll see several db related rake tasks listed. You might want
something like db:schema:dump, for example.


k…thank you …looks like schema:dump or structure:dump could work.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs