Jump to content

Does RockMigrations have an equivalent of Rails ActiveRecord "db:schema:dump"?


Recommended Posts

Hi Bernard,

In Rails, it's theoretically possible to take a non-Rails managed database and get the schema of it in ActiveRecord-based migrations:
db:schema:dump

The reason I bring this up is because if I wanted to take an existing non-RM PW project and start using RM in its entirety, I believe I currently have to manually make the master migrations file initially "by hand" even if it involves copying the field or template export code (let's not forget pages as well) RM conveniently provides when editing a field or template.

So my question is, does RM have an equivalent of Rails' schema dump to speed up completely RM-ifying an existing project or would I have to manually create those field and template migrations (and pages as well)?  I could do it by hand (no problem) and it would take 1-2 hours.

This question also touches up tearing up and down a site for testing.  Interested to hear your thoughts.

Link to comment
Share on other sites

17 hours ago, Jonathan Lahijani said:

take an existing non-RM PW project and start using RM in its entirety

Apologies if this is slightly off-topic, but it was one of the reasons I took a different approach with ProcessDbmigrate. That creates and reads json files and can be used on any existing database. Since I first built it, RockMigrations has moved on quite a bit, but I still like my module. I recently used it to create a skeleton site from an existing project, for example - just the fields, templates and pages I wanted. I have for some time been considering making it more interoperable with RockMigrations - e.g. to create the migrate code from the json file. I don’t know whether that would help, and haven’t really started looking at in detail, but it’s a thought. 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...