Rails Schema creation problem

前端 未结 6 1908
悲哀的现实
悲哀的现实 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条回答
  •  清歌不尽
    2021-02-01 10:08

    As I use foreign key constraints, I use the SQL format for migrations. In environment.rb:

    # Use SQL instead of Active Record's schema dumper when creating the test database.
    # This is necessary if your schema can't be completely dumped by the schema dumper,
    # like if you have constraints or database-specific column types
    config.active_record.schema_format = :sql
    

提交回复
热议问题