Rails Schema creation problem

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

    To use the SQL variant for testing (instead of schema.rb), you'll need to use

    rake db:test:clone_structure

    Our schema uses UUIDs (uuid gem) and also Red Hill on Rails (RHoR) nice FK plug-in. Unfortunately, the FKs require PKs that can only be added using EXECUTES in the migrations.

    It's well known that these executes do not make it to the schema.rb; however, it was harder to find the rake alternative to db:test:prepare for apps that cannot use schema.rb.

提交回复
热议问题