** Invoke db:migrate (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Invoke schema_version_check (first_time)
** Invoke environment
** Execute schema_version_check
** Execute db:migrate
== 20210306121310 BackfillPartitionedWebHookLogs: migrating ===================
-- transaction_open?()
-> 0.0001s
WARNING: Active Record does not support composite primary key.
web_hook_logs has composite primary key. Composite primary key is ignored.
rails aborted!
StandardError: An error has occurred, all later migrations canceled:
the column: argument must be set to a column name to use for ordering rows
/opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/each_batch.rb:52:in `each_batch'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migrations/background_migration_helpers.rb:109:in `queue_background_migration_jobs_by_range_at_intervals'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:395:in `enqueue_background_migration'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:108:in `enqueue_partitioning_data_migration'
/opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20210306121310_backfill_partitioned_web_hook_logs.rb:11:in `up'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:831:in `exec_migration'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:812:in `block (2 levels) in migrate'
/opt/gitlab/embedded/lib/ruby/2.7.0/benchmark.rb:293:in `measure'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:811:in `block in migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:471:in `with_connection'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:810:in `migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1002:in `migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1310:in `block in execute_migration_in_transaction'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1363:in `ddl_transaction'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1309:in `execute_migration_in_transaction'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1281:in `block in migrate_without_lock'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1280:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1280:in `migrate_without_lock'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1229:in `block in migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1382:in `with_advisory_lock'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1229:in `migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1061:in `up'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1036:in `migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/tasks/database_tasks.rb:238:in `migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/railties/databases.rake:86:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/railties/databases.rake:84:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/railties/databases.rake:84:in `block (2 levels) in <top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `block in execute'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `execute'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:199:in `synchronize'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:199:in `invoke_with_call_chain'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:188:in `invoke'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:160:in `invoke_task'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `block in top_level'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:125:in `run_with_threads'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:110:in `top_level'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/command.rb:48:in `invoke'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Caused by:
ArgumentError: the column: argument must be set to a column name to use for ordering rows
/opt/gitlab/embedded/service/gitlab-rails/app/models/concerns/each_batch.rb:52:in `each_batch'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migrations/background_migration_helpers.rb:109:in `queue_background_migration_jobs_by_range_at_intervals'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:395:in `enqueue_background_migration'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:108:in `enqueue_partitioning_data_migration'
/opt/gitlab/embedded/service/gitlab-rails/db/post_migrate/20210306121310_backfill_partitioned_web_hook_logs.rb:11:in `up'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:831:in `exec_migration'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:812:in `block (2 levels) in migrate'
/opt/gitlab/embedded/lib/ruby/2.7.0/benchmark.rb:293:in `measure'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:811:in `block in migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:471:in `with_connection'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:810:in `migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1002:in `migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1310:in `block in execute_migration_in_transaction'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1363:in `ddl_transaction'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1309:in `execute_migration_in_transaction'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1281:in `block in migrate_without_lock'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1280:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1280:in `migrate_without_lock'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1229:in `block in migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1382:in `with_advisory_lock'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1229:in `migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1061:in `up'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/migration.rb:1036:in `migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/tasks/database_tasks.rb:238:in `migrate'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/railties/databases.rake:86:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/railties/databases.rake:84:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.6/lib/active_record/railties/databases.rake:84:in `block (2 levels) in <top (required)>'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `block in execute'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `execute'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:199:in `synchronize'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:199:in `invoke_with_call_chain'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/task.rb:188:in `invoke'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:160:in `invoke_task'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `each'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:116:in `block in top_level'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:125:in `run_with_threads'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:110:in `top_level'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/rake-13.0.3/lib/rake/application.rb:186:in `standard_exception_handling'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/command.rb:48:in `invoke'
/opt/gitlab/embedded/lib/ruby/gems/2.7.0/gems/railties-6.0.3.6/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => db:migrate
root@ip-10-208-43-120:~#
Found this but it didn’t work: Omnibus Upgrade from 13.11.4 causing the issue PG::UndefinedObject: ERROR: constraint “web_hook_logs_pkey” - How to Use GitLab / Upgrade - GitLab Forum
Trying to do so yielded:
gitlabhq_production=> ALTER TABLE web_hook_logs ADD PRIMARY KEY USING INDEX web_hook_logs_pkey;
ERROR: index "web_hook_logs_pkey" is already associated with a constraint
LINE 1: ALTER TABLE web_hook_logs ADD PRIMARY KEY USING INDEX web_ho...