Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
b7b82324
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b7b82324
编写于
5月 01, 2018
作者:
D
Dylan Griffith
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Simplify AddCiRunnerGroups migration
上级
7e032589
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
12 deletion
+8
-12
db/migrate/20170301101006_add_ci_runner_groups.rb
db/migrate/20170301101006_add_ci_runner_groups.rb
+6
-10
db/schema.rb
db/schema.rb
+2
-2
未找到文件。
db/migrate/20170301101006_add_ci_runner_groups.rb
浏览文件 @
b7b82324
...
...
@@ -5,19 +5,15 @@ class AddCiRunnerGroups < ActiveRecord::Migration
disable_ddl_transaction!
def
up
def
change
create_table
:ci_runner_groups
do
|
t
|
t
.
integer
:runner_id
t
.
integer
:group_id
end
add_concurrent_index
:ci_runner_groups
,
:group_id
add_concurrent_index
:ci_runner_groups
,
[
:runner_id
,
:group_id
],
unique:
true
add_concurrent_foreign_key
:ci_runner_groups
,
:ci_runners
,
column: :runner_id
,
on_delete: :cascade
add_concurrent_foreign_key
:ci_runner_groups
,
:namespaces
,
column: :group_id
,
on_delete: :cascade
end
def
down
drop_table
:ci_runner_groups
t
.
index
[
:runner_id
,
:group_id
],
unique:
true
t
.
index
:group_id
t
.
foreign_key
:ci_runners
,
column: :runner_id
,
on_delete: :cascade
t
.
foreign_key
:namespaces
,
column: :group_id
,
on_delete: :cascade
end
end
end
db/schema.rb
浏览文件 @
b7b82324
...
...
@@ -2096,8 +2096,8 @@ ActiveRecord::Schema.define(version: 20180430143705) do
add_foreign_key
"ci_pipelines"
,
"ci_pipeline_schedules"
,
column:
"pipeline_schedule_id"
,
name:
"fk_3d34ab2e06"
,
on_delete: :nullify
add_foreign_key
"ci_pipelines"
,
"ci_pipelines"
,
column:
"auto_canceled_by_id"
,
name:
"fk_262d4c2d19"
,
on_delete: :nullify
add_foreign_key
"ci_pipelines"
,
"projects"
,
name:
"fk_86635dbd80"
,
on_delete: :cascade
add_foreign_key
"ci_runner_groups"
,
"ci_runners"
,
column:
"runner_id"
,
name:
"fk_d8a0baa93b"
,
on_delete: :cascade
add_foreign_key
"ci_runner_groups"
,
"namespaces"
,
column:
"group_id"
,
name:
"fk_cdafb3bbba"
,
on_delete: :cascade
add_foreign_key
"ci_runner_groups"
,
"ci_runners"
,
column:
"runner_id"
,
on_delete: :cascade
add_foreign_key
"ci_runner_groups"
,
"namespaces"
,
column:
"group_id"
,
on_delete: :cascade
add_foreign_key
"ci_runner_projects"
,
"projects"
,
name:
"fk_4478a6f1e4"
,
on_delete: :cascade
add_foreign_key
"ci_stages"
,
"ci_pipelines"
,
column:
"pipeline_id"
,
name:
"fk_fb57e6cc56"
,
on_delete: :cascade
add_foreign_key
"ci_stages"
,
"projects"
,
name:
"fk_2360681d1d"
,
on_delete: :cascade
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录