Rails Schema creation problem

前端 未结 6 1915
悲哀的现实
悲哀的现实 2021-02-01 09:52

I am using Jruby and rails 2.2.2. My problem is I have a migration that is not being correctly written to the database schema.

Here is my migration:

c         


        
6条回答
  •  猫巷女王i
    2021-02-01 10:18

    I too expected to see a new .sql file appear after a "rake db:migrate", once I set

    config.active_record.schema_format = :sql
    

    in config/environment.rb.

    Apparently that's not how it works, however. I have to do this explicitly to get a db/[development|test|production]_structure.sql file:

    rake db:structure:dump
    

提交回复
热议问题