PG :: DuplicateColumn: ERROR: столбец «encrypted_password» отношения «users» уже существует - PullRequest
0 голосов
/ 02 марта 2019

Итак, я столкнулся с проблемой при запуске rails db: migrate, которая выдает эту ошибку:

== 20190301194540 AddDeviseToUsers: migrating =================================
-- change_table(:users)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::DuplicateColumn: ERROR:  column "encrypted_password" of relation "users" already exists
: ALTER TABLE "users" ADD "encrypted_password" character varying DEFAULT '' NOT NULL
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:75:in `async_exec'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:75:in `block (2 levels) in execute'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activesupport-5.2.2/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:74:in `block in execute'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:579:in `block (2 levels) in log'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:578:in `block in log'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activesupport-5.2.2/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:569:in `log'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:73:in `execute'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:581:in `add_column'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/schema_statements.rb:420:in `add_column'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_definitions.rb:527:in `column'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_definitions.rb:232:in `block in string'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_definitions.rb:232:in `each'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_definitions.rb:232:in `string'
/Users/programming/Desktop/fitnesshabbits/db/migrate/20190301194540_add_devise_to_users.rb:8:in `block in up'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:471:in `change_table'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:871:in `block in method_missing'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:840:in `block in say_with_time'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:840:in `say_with_time'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:860:in `method_missing'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:604:in `method_missing'
/Users/programming/Desktop/fitnesshabbits/db/migrate/20190301194540_add_devise_to_users.rb:5:in `up'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:777:in `up'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:817:in `exec_migration'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:797:in `block in migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:796:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:977:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1343:in `block in ddl_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `block in transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/transactions.rb:212:in `transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1343:in `ddl_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `each'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `block in migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1036:in `up'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1011:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <main>'
/Users/programming/.rvm/rubies/ruby-2.6.1/bin/bundle:23:in `load'
/Users/programming/.rvm/rubies/ruby-2.6.1/bin/bundle:23:in `<main>'
/Users/programming/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in `eval'
/Users/programming/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in `<main>'

Caused by:
ActiveRecord::StatementInvalid: PG::DuplicateColumn: ERROR:  column "encrypted_password" of relation "users" already exists
: ALTER TABLE "users" ADD "encrypted_password" character varying DEFAULT '' NOT NULL
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:75:in `async_exec'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:75:in `block (2 levels) in execute'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activesupport-5.2.2/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activesupport-5.2.2/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:74:in `block in execute'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:579:in `block (2 levels) in log'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:578:in `block in log'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activesupport-5.2.2/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:569:in `log'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:73:in `execute'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:581:in `add_column'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/postgresql/schema_statements.rb:420:in `add_column'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_definitions.rb:527:in `column'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_definitions.rb:232:in `block in string'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_definitions.rb:232:in `each'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_definitions.rb:232:in `string'
/Users/programming/Desktop/fitnesshabbits/db/migrate/20190301194540_add_devise_to_users.rb:8:in `block in up'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:471:in `change_table'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:871:in `block in method_missing'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:840:in `block in say_with_time'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:840:in `say_with_time'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:860:in `method_missing'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:604:in `method_missing'
/Users/programming/Desktop/fitnesshabbits/db/migrate/20190301194540_add_devise_to_users.rb:5:in `up'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:777:in `up'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:817:in `exec_migration'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:797:in `block in migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:796:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:977:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1343:in `block in ddl_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `block in transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/transactions.rb:212:in `transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1343:in `ddl_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `each'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `block in migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1036:in `up'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1011:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <main>'
/Users/programming/.rvm/rubies/ruby-2.6.1/bin/bundle:23:in `load'
/Users/programming/.rvm/rubies/ruby-2.6.1/bin/bundle:23:in `<main>'
/Users/programming/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in `eval'
/Users/programming/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in `<main>'
/Users/programming/Desktop/fitnesshabbits/db/migrate/20190301194540_add_devise_to_users.rb:8:in `block in up'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:471:in `change_table'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:871:in `block in method_missing'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:840:in `block in say_with_time'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:840:in `say_with_time'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:860:in `method_missing'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:604:in `method_missing'
/Users/programming/Desktop/fitnesshabbits/db/migrate/20190301194540_add_devise_to_users.rb:5:in `up'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:777:in `up'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:817:in `exec_migration'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:797:in `block in migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:796:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:977:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1343:in `block in ddl_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `block in transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/transactions.rb:212:in `transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1343:in `ddl_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `each'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `migrate_without_lock'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `block in migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1363:in `with_advisory_lock'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1036:in `up'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/migration.rb:1011:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/Users/programming/.rvm/gems/ruby-2.6.1/gems/activerecord-5.2.2/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <main>'
/Users/programming/.rvm/rubies/ruby-2.6.1/bin/bundle:23:in `load'
/Users/programming/.rvm/rubies/ruby-2.6.1/bin/bundle:23:in `<main>'
/Users/programming/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in `eval'
/Users/programming/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

Эта проблема возникает, даже если я удаляю базу данных, закомментируйте определенные поля, например, такие как:encrypted_password в файле миграции.Я также попытался сбросить миграцию, установить ее в режим разработки.Я использую Devise и пытаюсь запустить этот файл миграции.Если у кого-нибудь есть идеи о том, почему или как это происходит, я буду признателен за некоторые идеи по устранению этой проблемы.

Может ли это произойти из-за ошибки в определенном файле?

Миграционный статус:

database: fitnesshabbits_development

 Status   Migration ID    Migration Name
--------------------------------------------------
   up     20190227233216  Devise create users
  down    20190301194540  Add devise to users

1 Ответ

0 голосов
/ 04 марта 2019

Я думаю, что вы добавили одно и то же поле в свои две миграции.Я думаю, что вы have add encrypted_password in you AddDeviseToUsers migration.Заблокируйте, чтобы в ваших миграциях не было повторяющихся полей.

...