diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 7d55a6c8754479f3cb837c24aeb5a9010a8435ee..93b3d69d28bd72635d5c9230f14f36787c59a66c 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -10,6 +10,6 @@ # end # ActiveSupport::Inflector.inflections do |inflect| - inflect.uncountable %w(award_emoji project_statistics) + inflect.uncountable %w(award_emoji project_statistics project_registry) inflect.acronym 'EE' end diff --git a/db_geo/migrate/20170206203234_create_project_registry.rb b/db_geo/migrate/20170206203234_create_project_registry.rb index 8d6550c9b8afe401cd1845f1c181f588b9d9292a..0efddece2ff01a7f87f1819ecdc653d2e126120b 100644 --- a/db_geo/migrate/20170206203234_create_project_registry.rb +++ b/db_geo/migrate/20170206203234_create_project_registry.rb @@ -1,6 +1,6 @@ class CreateProjectRegistry < ActiveRecord::Migration def change - create_table :project_registries do |t| + create_table :project_registry do |t| t.integer :project_id, null: false t.datetime :last_repository_synced_at t.datetime :last_repository_successful_sync_at diff --git a/db_geo/migrate/20170302005747_add_index_to_project_id_on_project_registries.rb b/db_geo/migrate/20170302005747_add_index_to_project_id_on_project_registries.rb deleted file mode 100644 index e297e7ec58cb7120f2dd268f2ddab0d93995cb59..0000000000000000000000000000000000000000 --- a/db_geo/migrate/20170302005747_add_index_to_project_id_on_project_registries.rb +++ /dev/null @@ -1,15 +0,0 @@ -class AddIndexToProjectIdOnProjectRegistries < ActiveRecord::Migration - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - def up - add_concurrent_index :project_registries, :project_id - end - - def down - remove_index :project_registries, :project_id - end -end diff --git a/db_geo/migrate/20170302005747_add_index_to_project_id_on_project_registry.rb b/db_geo/migrate/20170302005747_add_index_to_project_id_on_project_registry.rb new file mode 100644 index 0000000000000000000000000000000000000000..1a514b987c83bb0aabfd2ece6da6f58204cab164 --- /dev/null +++ b/db_geo/migrate/20170302005747_add_index_to_project_id_on_project_registry.rb @@ -0,0 +1,15 @@ +class AddIndexToProjectIdOnProjectRegistry < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :project_registry, :project_id + end + + def down + remove_index :project_registry, :project_id + end +end diff --git a/db_geo/schema.rb b/db_geo/schema.rb index a50cdccb2de8be7b818109724b355bf9882bfbcc..e6a6d7dcd86c92717eee43a12f2509738d075604 100644 --- a/db_geo/schema.rb +++ b/db_geo/schema.rb @@ -15,12 +15,12 @@ ActiveRecord::Schema.define(version: 20170302005747) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" - create_table "project_registries", force: :cascade do |t| + create_table "project_registry", force: :cascade do |t| t.integer "project_id", null: false t.datetime "last_repository_synced_at" t.datetime "last_repository_successful_sync_at" t.datetime "created_at", null: false end - add_index "project_registries", ["project_id"], name: "index_project_registries_on_project_id", using: :btree + add_index "project_registry", ["project_id"], name: "index_project_registry_on_project_id", using: :btree end