我发现这个问题非常有趣,我想了解如何生成迁移以在项目中使用的其他数据库中创建表。
我该如何使这样的迁移在第二个数据库中生成表?
任何线索?
我该如何使这样的迁移在第二个数据库中生成表?
class CreateOriginalCompanies < ActiveRecord::Migration
def change
create_table :original_companies do |t|
t.string :CompanyName
t.string :RegAddress_AddressLine1
t.string :RegAddress_AddressLine2
t.string :RegAddress_PostTown
t.string :RegAddress_Country
t.string :RegAddress_PostCode
t.string :CompanyCategory
t.string :CompanyStatus
t.timestamps null: false
end
end
end
任何线索?
ActiveRecord::AdapterNotSpecified
异常,由activerecord (4.2.0) lib/active_record/connection_adapters/connection_specification.rb:248:in
resolve_symbol_connection'` 引起。 - Don GiulioRakefile
中,@sriharisairamVentrapragada。 - sudoremo