How to generate a model without creating a migration file for it

Hi Guys,
I want to skip the creation of a migration file while generating a model. I already have the database created. Please how do I go about this. Tnx in advance.

Best Regards,

1 Like

Generate the model normally and then delete the migration file? :slight_smile: Or just create model ruby file and you are done.

Or use the --skip-migration flag:

rails g model User --skip-migration

      invoke  active_record
      create    app/models/user.rb
      invoke    test_unit
      create      test/models/user_test.rb
      create      test/fixtures/users.yml
3 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.