Добавить ссылку в мою миграционную ошибку

я создаю rails new demo_project, используя базу данных mysql, мои учетные данные были в порядке, я создаю таблицу my using rake db: create

Created database 'demo_project_development'
Created database 'demo_project_test'

то я создаю таблицу

rails g model Product name:string description:text inventory:integer 'price:decimal{7,2}' restocked_at:datetime

и это был успех

class CreateProducts < ActiveRecord::Migration[5.0]
  def change
    create_table :products do |t|
      t.string :name
      t.text :description
      t.integer :inventory
      t.decimal :price, precision: 7, scale: 2
      t.datetime :restocked_at

      t.timestamps
    end
  end
end

после этого я создаю миграцию

rails g migration AddQtySoldToProducts qty_solid:integer

и создать это

class AddQtySoldToProducts < ActiveRecord::Migration[5.0]
  def change
    add_column :products, :qty_solid, :integer
  end
end

и после этого я создаю другую миграцию

rails g migration AddRefNumToProducts ref_num:string:index

и создать это

class AddRefNumToProducts < ActiveRecord::Migration[5.0]
  def change
    add_column :products, :ref_num, :string
    add_index :products, :ref_num
  end
end

и последняя миграция

rails g migration AddStyleToProducts style:references

и создать это

class AddStyleToProducts < ActiveRecord::Migration[5.0]
  def change
    add_reference :products, :style, foreign_key: true
  end
end

когда я запускаю rake db:migrate я получил ошибку

== 20170213061527 CreateProducts: миграция

- create_table (: products) → 0.1451s == 20170213061527 CreateProducts: migrated (0.1453s) ==========================

== 20170213061805 AddQtySoldToProducts: миграция ==================================================================================================================================================================================================================================================================================== 0.3441s == 20170213061805 AddQtySoldToProducts: мигрированный (0.3443s) ====================

== 20170213061950 AddRefNumToProducts: миграция ====================================================================================================================================================================================================================================================================================> 0.0964s - add_index (: products,: ref_num) → 0.4156s == 20170213061950 AddRefNumToProducts: migrated (0.5121s) ======================

== 20170213062130 AddStyleToProducts: migersion ============================================================================================================================================================================================================================================================= => true}) rake aborted! StandardError: произошла ошибка, все последующие миграции отменены:

Mysql2 :: Ошибка: Невозможно добавить ограничение внешнего ключа: ALTER TABLE products ADD CONSTRAINT fk_rails_326a064677 FOREIGN KEY (style_id) Лит styles (id)/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/mysql2-0.4.5/lib/mysql2/client.rb: 120: in _query'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/mysql2-0.4.5/lib/mysql2/client.rb:120:in блоке в запросе '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/mysql2-0.4.5/lib/mysql2/client.rb:119:in handle_interrupt'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/mysql2-0.4.5/lib/mysql2/client.rb:119:in запросе '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb: 218: в block in execute'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_adapter.rb:589:in блоке в журнале '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.1/lib/active_support/notifications/instrumenter.rb21:in instrument'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_adapter.rb:583:in instrument'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_adapter.rb:583:in журнале '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord -5.0.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb: 218: in execute'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/mysql/database_statements.rb:31:in execute '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/schema_statements.rb: 916: в add_foreign_key'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/schema_definitions.rb:623:in foreign_key'/Пользователи /cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/schema_definitions.rb: 100: in add_to'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:826:in add_reference '/U sers/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 846: в block in method_missing'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:815:in блоке say_with_time '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:815:in say_with_time'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:835:in method_missing '/Users/cdasia-tsd/Desktop/demo_project/db/migrate/20170213062130_add_style_to_products.rb:3:in change'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:789:in exec_migration '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 773: в block (2 levels) in migrate'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:772:in блоке в migrate '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activ erecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb: 398: in with_connection'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:771:in migrate '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:951:in migrate'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1212:in блоке в execute_migration_in_transaction'/Users/cdasia-tsd/. rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 1282: in ddl_transaction'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1211:in execute_migration_in_transaction '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 1184: в block in migrate_without_lock'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1183:in каждом "/Users/cdasia-tsd/.rvm/gems/ruby-2. 3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 1183: in migrate_without_lock'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1132:in block in migrate '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1299: in with_advisory_lock'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1132:in migrate'/Users/cdasia-tsd/. rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 1006: in up'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:984:in migrate '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb: 161: in migrate'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/railties/databases.rake:58:in блок (2 уровня) в '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/exe/rake:27:in <top (required)>'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in <top (required)>'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in eval '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15: in <main>' ActiveRecord::StatementInvalid: Mysql2::Error: Cannot add foreign key constraint: ALTER TABLE продукты <main>' ActiveRecord::StatementInvalid: Mysql2::Error: Cannot add foreign key constraint: ALTER TABLE ADD CONSTRAINT fk_rails_326a064677 FOREIGN KEY ( style_id ) REFERENCES СПИСОК ) REFERENCES ( id )/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/mysql2-0.4.5/lib/mysql2/client.rb:120:in _query '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/mysql2-0.4.5/lib/mysql2/client.rb: 120: в block in query'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/mysql2-0.4.5/lib/mysql2/client.rb:119:in handle_interrupt '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/mysql2-0.4.5/lib/mysql2/client.rb:119:in query'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:218:in block in execute '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_adap ter.rb: 589: в block in log'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.1/lib/active_support/notifications/instrumenter.rb:21:in инструмент '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_adapter.rb:583:in log'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:218:in execute '/Users/cdasia-tsd/.rvm/gems/ruby-2.3. 3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/mysql/database_statements.rb: 31: in execute'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:916:in add_foreign_key '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/schema_definitions.rb: 623: in foreign_key'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/schema_definitions.rb:100:in foreign_key'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/schema_definitions.rb:100:in add_to '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:826:in add_reference'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:846:in блоке в method_missing'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 815: в block in say_with_time'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:815:in say_with_time '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:835:in method_missing'/Users/cdasia-tsd/Desktop/demo_project/db/migrate/20170213062130_add_style_to_products.rb:3:in change'/Users/cdasia-tsd/.rvm/gems/ruby- 2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 789: in exec_migration'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:773:in block (2 уровни) в migrate '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:772:in block in migrate'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in with_connection '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:771:in migrate'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:951:in migrate '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 1212: в block in execute_migration_in_transaction'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1282:in ddl_transaction'/Пользователи /cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 1211: in execute_migration_in_transaction'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1184:in execute_migration_in_transaction'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1184:in блоке migrate_without_lock '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1183: в each'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1183:in migrate_without_lock '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1132:in block in migrate'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1299:in with_advisory_lock '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 1132: in migrate'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1006:in up'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 984: in migrate'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/tasks/database_tasks.rb:161:in migrate '/Users/cdasia-tsd/.rvm/gems/ruby -2.3.3/gems/activerecord-5.0.1/lib/active_record/railties/databases.rake: 58: в block (2 levels) in <top (required)>'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/exe/rake:27:in '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in eval'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in 'Mysql2 :: Ошибка: не удается добавить ограничение внешнего ключа /Users/cdasia-tsd/.rvm/gems/ruby- 2.3.3/gems/mysql2-0.4.5/lib/mysql2/client.rb: 120: in _query'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/mysql2-0.4.5/lib/mysql2/client.rb:120:in блоке в запросе '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/mysql2-0.4.5/lib/mysql2/client.rb: 119: in handle_interrupt'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/mysql2-0.4.5/lib/mysql2/client.rb:119:in query'/Пользователи /cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:218:в block in execute'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_adapter.rb:589:in block in execute'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_adapter.rb:589:in блоке в журнале '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activesupport-5.0.1/lib/active_support/notifications/instrumenter.rb: 21: в instrument'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_adapter.rb:583:in log'/Пользователи /cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb: 218: in execute'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/mysql/database_statements.rb:31:in execute '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:916:in add_foreign_key'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/schema_definitions.rb:623:in foreign_key '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/ac tive_record/connection_adapters/abstract/schema_definitions.rb: 100: in add_to'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:826:in add_reference '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:846:в block in method_missing'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:815:in блоке say_with_time '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 815: in say_with_time'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:835:in method_missing '/Users/cdasia-tsd/Desktop/demo_project/db/migrate/20170213062130_add_style_to_products.rb:3:in change'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:789:in exec_migration '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/li b/active_record/migration.rb: 773: в block (2 levels) in migrate'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:772:in block in migrate '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:398: in with_connection'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:771:in migrate'/Users/cdasia-tsd/. rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 951: in migrate'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1212:in block in execute_migration_in_transaction '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 1282: in ddl_transaction'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1211:in execute_migration_in_transaction'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems /activerecord-5.0.1/lib/active_record/migration.rb:1184:в block in migrate_without_lock'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1183:in каждом '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1183:in migrate_without_lock'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1132:in block in migrate '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1299:in with_advisory_lock'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:1132:in migrate '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb: 1006: in up'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/migration.rb:984:in migrate'/Пользователи /cdasia-TSD/.rvm/драгоценные камни/рубиновый 2.3.3/камни /ActiveRecord-5.0.1/Library/active_record/задачи /database_tasks.rb: 161: in migrate'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/activerecord-5.0.1/lib/active_record/railties/databases.rake:58:in block (2 уровня) в'/Пользователи /cdasia-tsd/.rvm/gems/ruby-2.3.3/gems/rake-12.0.0/exe/rake: 27: in <top (required)>'/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in eval '/Users/cdasia-tsd/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in' 'Задачи: TOP => db: migrate (см. полный след, запустив задачу с помощью --trace) TSD-Interns-MacBook-Pro: demo_project cdasia-tsd $

+1
источник поделиться
2 ответа

У вас нет таблицы styles.

+1
источник

Да, перед запуском этой миграции вы должны создать таблицу стилей, иначе вы получите такую же проблему.

Пожалуйста, посмотрите ниже ссылку, возможно, это поможет вам -

add_reference link1

add_reference link2

Примечание: если вы пишете где-либо add_reference, пожалуйста, убедитесь, что сначала должна присутствовать эта таблица или если вы хотите создать вместе всю миграцию, тогда порядок миграции должен быть первым переносом создания ссылочной таблицы после этой миграции миграции, которая имеет add_reference.

0
источник

Посмотрите другие вопросы по меткам или Задайте вопрос