Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cbbb506a
Commit
cbbb506a
authored
Mar 07, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move geo database paths to db/geo rather than a root-level db_geo
parent
d65550ca
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
9 additions
and
7 deletions
+9
-7
.rubocop.yml
.rubocop.yml
+1
-1
db/geo/migrate/.gitkeep
db/geo/migrate/.gitkeep
+0
-0
db/geo/migrate/20170206203234_create_project_registry.rb
db/geo/migrate/20170206203234_create_project_registry.rb
+0
-0
db/geo/migrate/20170302005747_add_index_to_project_id_on_project_registry.rb
...0302005747_add_index_to_project_id_on_project_registry.rb
+0
-0
db/geo/schema.rb
db/geo/schema.rb
+2
-0
db/geo/seeds.rb
db/geo/seeds.rb
+0
-0
lib/generators/rails/geo_migration_generator.rb
lib/generators/rails/geo_migration_generator.rb
+1
-1
lib/gitlab/geo/health_check.rb
lib/gitlab/geo/health_check.rb
+1
-1
lib/tasks/geo.rake
lib/tasks/geo.rake
+4
-4
No files found.
.rubocop.yml
View file @
cbbb506a
...
@@ -20,7 +20,7 @@ AllCops:
...
@@ -20,7 +20,7 @@ AllCops:
-
'
node_modules/**/*'
-
'
node_modules/**/*'
-
'
db/*'
-
'
db/*'
-
'
db/fixtures/**/*'
-
'
db/fixtures/**/*'
-
'
db
_
geo/*'
-
'
db
/
geo/*'
-
'
tmp/**/*'
-
'
tmp/**/*'
-
'
bin/**/*'
-
'
bin/**/*'
-
'
generator_templates/**/*'
-
'
generator_templates/**/*'
...
...
db
_
geo/migrate/.gitkeep
→
db
/
geo/migrate/.gitkeep
View file @
cbbb506a
File moved
db
_
geo/migrate/20170206203234_create_project_registry.rb
→
db
/
geo/migrate/20170206203234_create_project_registry.rb
View file @
cbbb506a
File moved
db
_
geo/migrate/20170302005747_add_index_to_project_id_on_project_registry.rb
→
db
/
geo/migrate/20170302005747_add_index_to_project_id_on_project_registry.rb
View file @
cbbb506a
File moved
db
_
geo/schema.rb
→
db
/
geo/schema.rb
View file @
cbbb506a
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
# It's strongly recommended that you check this file into your version control system.
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
20170302005747
)
do
ActiveRecord
::
Schema
.
define
(
version:
20170302005747
)
do
# These are extensions that must be enabled in order to support this database
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
enable_extension
"plpgsql"
...
@@ -23,4 +24,5 @@ ActiveRecord::Schema.define(version: 20170302005747) do
...
@@ -23,4 +24,5 @@ ActiveRecord::Schema.define(version: 20170302005747) do
end
end
add_index
"project_registry"
,
[
"project_id"
],
name:
"index_project_registry_on_project_id"
,
using: :btree
add_index
"project_registry"
,
[
"project_id"
],
name:
"index_project_registry_on_project_id"
,
using: :btree
end
end
db
_
geo/seeds.rb
→
db
/
geo/seeds.rb
View file @
cbbb506a
File moved
lib/generators/rails/geo_migration_generator.rb
View file @
cbbb506a
...
@@ -12,6 +12,6 @@ class GeoMigrationGenerator < ActiveRecord::Generators::MigrationGenerator
...
@@ -12,6 +12,6 @@ class GeoMigrationGenerator < ActiveRecord::Generators::MigrationGenerator
def
create_migration_file
def
create_migration_file
set_local_assigns!
set_local_assigns!
validate_file_name!
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
end
end
lib/gitlab/geo/health_check.rb
View file @
cbbb506a
...
@@ -18,7 +18,7 @@ module Gitlab
...
@@ -18,7 +18,7 @@ module Gitlab
def
self
.
db_migrate_path
def
self
.
db_migrate_path
# Lazy initialisation so Rails.root will be defined
# 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
end
def
self
.
get_database_version
def
self
.
get_database_version
...
...
lib/tasks/geo.rake
View file @
cbbb506a
...
@@ -54,11 +54,11 @@ namespace :geo do
...
@@ -54,11 +54,11 @@ namespace :geo do
}
}
# set config variables for geo database
# set config variables for geo database
ENV
[
'SCHEMA'
]
=
'db
_
geo/schema.rb'
ENV
[
'SCHEMA'
]
=
'db
/
geo/schema.rb'
ENV
[
'SKIP_POST_DEPLOYMENT_MIGRATIONS'
]
=
'true'
ENV
[
'SKIP_POST_DEPLOYMENT_MIGRATIONS'
]
=
'true'
Rails
.
application
.
config
.
paths
[
'db'
]
=
[
'db
_
geo'
]
Rails
.
application
.
config
.
paths
[
'db'
]
=
[
'db
/
geo'
]
Rails
.
application
.
config
.
paths
[
'db/migrate'
]
=
[
'db
_
geo/migrate'
]
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/seeds.rb'
]
=
[
'db
/
geo/seeds.rb'
]
Rails
.
application
.
config
.
paths
[
'config/database'
]
=
[
'config/database_geo.yml'
]
Rails
.
application
.
config
.
paths
[
'config/database'
]
=
[
'config/database_geo.yml'
]
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment