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
d9abaab0
Commit
d9abaab0
authored
Jun 18, 2019
by
Arun Kumar Mohan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disallow `NULL` values for `geo_nodes.primary` column
parent
6fa90054
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
db/post_migrate/20190618171120_update_geo_nodes_primary.rb
db/post_migrate/20190618171120_update_geo_nodes_primary.rb
+20
-0
db/schema.rb
db/schema.rb
+2
-2
No files found.
db/post_migrate/20190618171120_update_geo_nodes_primary.rb
0 → 100644
View file @
d9abaab0
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
UpdateGeoNodesPrimary
<
ActiveRecord
::
Migration
[
5.1
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
def
up
change_column_default
(
:geo_nodes
,
:primary
,
false
)
change_column_null
(
:geo_nodes
,
:primary
,
false
,
false
)
end
def
down
change_column_default
(
:geo_nodes
,
:primary
,
nil
)
change_column_null
(
:geo_nodes
,
:primary
,
true
)
end
end
db/schema.rb
View file @
d9abaab0
...
...
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2019061
3030606
)
do
ActiveRecord
::
Schema
.
define
(
version:
2019061
8171120
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -1391,7 +1391,7 @@ ActiveRecord::Schema.define(version: 20190613030606) do
end
create_table
"geo_nodes"
,
id: :serial
,
force: :cascade
do
|
t
|
t
.
boolean
"primary"
t
.
boolean
"primary"
,
default:
false
,
null:
false
t
.
integer
"oauth_application_id"
t
.
boolean
"enabled"
,
default:
true
,
null:
false
t
.
string
"access_key"
...
...
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