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
45cecae9
Commit
45cecae9
authored
Feb 07, 2019
by
James Fargher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move ChatOps migrations to Core
parent
35bc3906
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
db/migrate/20180209115333_create_chatops_tables.rb
db/migrate/20180209115333_create_chatops_tables.rb
+26
-0
db/schema.rb
db/schema.rb
+10
-0
No files found.
db/migrate/20180209115333_create_chatops_tables.rb
0 → 100644
View file @
45cecae9
# frozen_string_literal: true
class
CreateChatopsTables
<
ActiveRecord
::
Migration
[
4.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
def
change
create_table
:ci_pipeline_chat_data
,
id: :bigserial
do
|
t
|
t
.
integer
:pipeline_id
,
null:
false
t
.
references
:chat_name
,
foreign_key:
{
on_delete: :cascade
},
null:
false
t
.
text
:response_url
,
null:
false
# A pipeline can only contain one row in this table, hence this index is
# unique.
t
.
index
:pipeline_id
,
unique:
true
t
.
index
:chat_name_id
end
# rubocop:disable Migration/AddConcurrentForeignKey
add_foreign_key
:ci_pipeline_chat_data
,
:ci_pipelines
,
column: :pipeline_id
,
on_delete: :cascade
end
end
db/schema.rb
View file @
45cecae9
...
@@ -419,6 +419,14 @@ ActiveRecord::Schema.define(version: 20190131122559) do
...
@@ -419,6 +419,14 @@ ActiveRecord::Schema.define(version: 20190131122559) do
t
.
index
[
"project_id"
],
name:
"index_ci_job_artifacts_on_project_id"
,
using: :btree
t
.
index
[
"project_id"
],
name:
"index_ci_job_artifacts_on_project_id"
,
using: :btree
end
end
create_table
"ci_pipeline_chat_data"
,
id: :bigserial
,
force: :cascade
do
|
t
|
t
.
integer
"pipeline_id"
,
null:
false
t
.
integer
"chat_name_id"
,
null:
false
t
.
text
"response_url"
,
null:
false
t
.
index
[
"chat_name_id"
],
name:
"index_ci_pipeline_chat_data_on_chat_name_id"
,
using: :btree
t
.
index
[
"pipeline_id"
],
name:
"index_ci_pipeline_chat_data_on_pipeline_id"
,
unique:
true
,
using: :btree
end
create_table
"ci_pipeline_schedule_variables"
,
force: :cascade
do
|
t
|
create_table
"ci_pipeline_schedule_variables"
,
force: :cascade
do
|
t
|
t
.
string
"key"
,
null:
false
t
.
string
"key"
,
null:
false
t
.
text
"value"
t
.
text
"value"
...
@@ -2341,6 +2349,8 @@ ActiveRecord::Schema.define(version: 20190131122559) do
...
@@ -2341,6 +2349,8 @@ ActiveRecord::Schema.define(version: 20190131122559) do
add_foreign_key
"ci_group_variables"
,
"namespaces"
,
column:
"group_id"
,
name:
"fk_33ae4d58d8"
,
on_delete: :cascade
add_foreign_key
"ci_group_variables"
,
"namespaces"
,
column:
"group_id"
,
name:
"fk_33ae4d58d8"
,
on_delete: :cascade
add_foreign_key
"ci_job_artifacts"
,
"ci_builds"
,
column:
"job_id"
,
on_delete: :cascade
add_foreign_key
"ci_job_artifacts"
,
"ci_builds"
,
column:
"job_id"
,
on_delete: :cascade
add_foreign_key
"ci_job_artifacts"
,
"projects"
,
on_delete: :cascade
add_foreign_key
"ci_job_artifacts"
,
"projects"
,
on_delete: :cascade
add_foreign_key
"ci_pipeline_chat_data"
,
"chat_names"
,
on_delete: :cascade
add_foreign_key
"ci_pipeline_chat_data"
,
"ci_pipelines"
,
column:
"pipeline_id"
,
on_delete: :cascade
add_foreign_key
"ci_pipeline_schedule_variables"
,
"ci_pipeline_schedules"
,
column:
"pipeline_schedule_id"
,
name:
"fk_41c35fda51"
,
on_delete: :cascade
add_foreign_key
"ci_pipeline_schedule_variables"
,
"ci_pipeline_schedules"
,
column:
"pipeline_schedule_id"
,
name:
"fk_41c35fda51"
,
on_delete: :cascade
add_foreign_key
"ci_pipeline_schedules"
,
"projects"
,
name:
"fk_8ead60fcc4"
,
on_delete: :cascade
add_foreign_key
"ci_pipeline_schedules"
,
"projects"
,
name:
"fk_8ead60fcc4"
,
on_delete: :cascade
add_foreign_key
"ci_pipeline_schedules"
,
"users"
,
column:
"owner_id"
,
name:
"fk_9ea99f58d2"
,
on_delete: :nullify
add_foreign_key
"ci_pipeline_schedules"
,
"users"
,
column:
"owner_id"
,
name:
"fk_9ea99f58d2"
,
on_delete: :nullify
...
...
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