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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
632d9b26
Commit
632d9b26
authored
Nov 12, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop default value on status column in deployments table
parent
dbb342d4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
db/migrate/20181112103239_drop_default_value_on_status_deployments.rb
...0181112103239_drop_default_value_on_status_deployments.rb
+18
-0
db/schema.rb
db/schema.rb
+3
-2
No files found.
db/migrate/20181112103239_drop_default_value_on_status_deployments.rb
0 → 100644
View file @
632d9b26
# frozen_string_literal: true
class
DropDefaultValueOnStatusDeployments
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
DEPLOYMENT_STATUS_SUCCESS
=
2
# Equivalent to Deployment.state_machine.states['success'].value
disable_ddl_transaction!
def
up
change_column_default
:deployments
,
:status
,
:nil
end
def
down
change_column_default
:deployments
,
:status
,
DEPLOYMENT_STATUS_SUCCESS
end
end
db/schema.rb
View file @
632d9b26
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,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:
201811
07054254
)
do
ActiveRecord
::
Schema
.
define
(
version:
201811
12103239
)
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"
...
@@ -836,7 +836,7 @@ ActiveRecord::Schema.define(version: 20181107054254) do
...
@@ -836,7 +836,7 @@ ActiveRecord::Schema.define(version: 20181107054254) do
t
.
datetime
"created_at"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
datetime
"updated_at"
t
.
string
"on_stop"
t
.
string
"on_stop"
t
.
integer
"status"
,
limit:
2
,
default:
2
,
null:
false
t
.
integer
"status"
,
limit:
2
,
null:
false
t
.
datetime_with_timezone
"finished_at"
t
.
datetime_with_timezone
"finished_at"
end
end
...
@@ -1865,6 +1865,7 @@ ActiveRecord::Schema.define(version: 20181107054254) do
...
@@ -1865,6 +1865,7 @@ ActiveRecord::Schema.define(version: 20181107054254) do
end
end
add_index
"redirect_routes"
,
[
"path"
],
name:
"index_redirect_routes_on_path"
,
unique:
true
,
using: :btree
add_index
"redirect_routes"
,
[
"path"
],
name:
"index_redirect_routes_on_path"
,
unique:
true
,
using: :btree
add_index
"redirect_routes"
,
[
"path"
],
name:
"index_redirect_routes_on_path_text_pattern_ops"
,
using: :btree
,
opclasses:
{
"path"
=>
"varchar_pattern_ops"
}
add_index
"redirect_routes"
,
[
"source_type"
,
"source_id"
],
name:
"index_redirect_routes_on_source_type_and_source_id"
,
using: :btree
add_index
"redirect_routes"
,
[
"source_type"
,
"source_id"
],
name:
"index_redirect_routes_on_source_type_and_source_id"
,
using: :btree
create_table
"releases"
,
force: :cascade
do
|
t
|
create_table
"releases"
,
force: :cascade
do
|
t
|
...
...
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