I know I can do a db:create and create database tables or db:migrate to a new version, however what I want to do is import the schema from an existing database (all tables) and generate models for each one.
Does ActiveRecord have the ability to do this? Thanks!
Nope. ActiveRecord is an ORM, so it doesn't have anything to do with generating database schemas or generating models. Rails doesn't have any concept of doing this, either.
You'll have to write the database migrations and do this yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With