Rails Schema creation problem

前端 未结 6 1905
悲哀的现实
悲哀的现实 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:16

    christian is right.

    do

    config.active_record.schema_format = :sql

    in environment.rb

    but then you have to use a different schema dump format and file location. try doing your migration and looking for "schema.sql" instead of scehema.rb

    the reason for all of this is that the point of the scheme file is a database unspecific (works for all types of databases) file. so when you use features which only work on mysql through an unsupoorted execute statement, they can't be shoehorned in to schema.rb

提交回复
热议问题