ruby on rails - generate activerecord schema from an existing table -
does know of way this?
i have existing table created sql , create schema reproduce table (minus data)
- edit config/database.rb point database want copied.
rake db:schema:dump
- create blank migration
- copy relevant
create_table
lines schema dump , paste migration file - manually insert migration timestamp schema_migrations table (this applies existing setup has relevant table)
Comments
Post a Comment