Move geo database paths to db/geo rather than a root-level db_geo

parent d65550ca
......@@ -20,7 +20,7 @@ AllCops:
- 'node_modules/**/*'
- 'db/*'
- 'db/fixtures/**/*'
- 'db_geo/*'
- 'db/geo/*'
- 'tmp/**/*'
- 'bin/**/*'
- 'generator_templates/**/*'
......
......@@ -12,6 +12,7 @@
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170302005747) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -23,4 +24,5 @@ ActiveRecord::Schema.define(version: 20170302005747) do
end
add_index "project_registry", ["project_id"], name: "index_project_registry_on_project_id", using: :btree
end
......@@ -12,6 +12,6 @@ class GeoMigrationGenerator < ActiveRecord::Generators::MigrationGenerator
def create_migration_file
set_local_assigns!
validate_file_name!
migration_template @migration_template, "db_geo/migrate/#{file_name}.rb"
migration_template @migration_template, "db/geo/migrate/#{file_name}.rb"
end
end
......@@ -18,7 +18,7 @@ module Gitlab
def self.db_migrate_path
# Lazy initialisation so Rails.root will be defined
@db_migrate_path ||= File.join(Rails.root, 'db_geo', 'migrate')
@db_migrate_path ||= File.join(Rails.root, 'db', 'geo', 'migrate')
end
def self.get_database_version
......
......@@ -54,11 +54,11 @@ namespace :geo do
}
# set config variables for geo database
ENV['SCHEMA'] = 'db_geo/schema.rb'
ENV['SCHEMA'] = 'db/geo/schema.rb'
ENV['SKIP_POST_DEPLOYMENT_MIGRATIONS'] = 'true'
Rails.application.config.paths['db'] = ['db_geo']
Rails.application.config.paths['db/migrate'] = ['db_geo/migrate']
Rails.application.config.paths['db/seeds.rb'] = ['db_geo/seeds.rb']
Rails.application.config.paths['db'] = ['db/geo']
Rails.application.config.paths['db/migrate'] = ['db/geo/migrate']
Rails.application.config.paths['db/seeds.rb'] = ['db/geo/seeds.rb']
Rails.application.config.paths['config/database'] = ['config/database_geo.yml']
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment