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
Léo-Paul Géneau
gitlab-ce
Commits
15492398
Commit
15492398
authored
Mar 01, 2017
by
Alexis Reigel
Committed by
Alexis Reigel
Apr 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Ci::RunnerGroup join model
parent
c212908a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
0 deletions
+48
-0
app/models/ci/runner_group.rb
app/models/ci/runner_group.rb
+8
-0
db/migrate/20170301101006_add_ci_runner_groups.rb
db/migrate/20170301101006_add_ci_runner_groups.rb
+27
-0
db/schema.rb
db/schema.rb
+13
-0
No files found.
app/models/ci/runner_group.rb
0 → 100644
View file @
15492398
module
Ci
class
RunnerGroup
<
ActiveRecord
::
Base
extend
Gitlab
::
Ci
::
Model
belongs_to
:runner
belongs_to
:group
,
class_name:
'::Group'
end
end
db/migrate/20170301101006_add_ci_runner_groups.rb
0 → 100644
View file @
15492398
class
AddCiRunnerGroups
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
create_table
:ci_runner_groups
do
|
t
|
t
.
integer
:runner_id
t
.
integer
:group_id
t
.
timestamps_with_timezone
null:
false
end
add_concurrent_index
:ci_runner_groups
,
:runner_id
add_concurrent_foreign_key
:ci_runner_groups
,
:ci_runners
,
column: :runner_id
,
on_delete: :cascade
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
,
:namespaces
,
column: :group_id
,
on_delete: :cascade
end
def
down
drop_table
:ci_runner_groups
end
end
db/schema.rb
View file @
15492398
...
@@ -443,6 +443,17 @@ ActiveRecord::Schema.define(version: 20180418053107) do
...
@@ -443,6 +443,17 @@ ActiveRecord::Schema.define(version: 20180418053107) do
add_index
"ci_pipelines"
,
[
"status"
],
name:
"index_ci_pipelines_on_status"
,
using: :btree
add_index
"ci_pipelines"
,
[
"status"
],
name:
"index_ci_pipelines_on_status"
,
using: :btree
add_index
"ci_pipelines"
,
[
"user_id"
],
name:
"index_ci_pipelines_on_user_id"
,
using: :btree
add_index
"ci_pipelines"
,
[
"user_id"
],
name:
"index_ci_pipelines_on_user_id"
,
using: :btree
create_table
"ci_runner_groups"
,
force: :cascade
do
|
t
|
t
.
integer
"runner_id"
t
.
integer
"group_id"
t
.
datetime
"created_at"
,
null:
false
t
.
datetime
"updated_at"
,
null:
false
end
add_index
"ci_runner_groups"
,
[
"group_id"
],
name:
"index_ci_runner_groups_on_group_id"
,
using: :btree
add_index
"ci_runner_groups"
,
[
"runner_id"
,
"group_id"
],
name:
"index_ci_runner_groups_on_runner_id_and_group_id"
,
unique:
true
,
using: :btree
add_index
"ci_runner_groups"
,
[
"runner_id"
],
name:
"index_ci_runner_groups_on_runner_id"
,
using: :btree
create_table
"ci_runner_projects"
,
force: :cascade
do
|
t
|
create_table
"ci_runner_projects"
,
force: :cascade
do
|
t
|
t
.
integer
"runner_id"
,
null:
false
t
.
integer
"runner_id"
,
null:
false
t
.
datetime
"created_at"
t
.
datetime
"created_at"
...
@@ -2078,6 +2089,8 @@ ActiveRecord::Schema.define(version: 20180418053107) do
...
@@ -2078,6 +2089,8 @@ ActiveRecord::Schema.define(version: 20180418053107) 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_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"
,
"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_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_projects"
,
"projects"
,
name:
"fk_4478a6f1e4"
,
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"
,
"ci_pipelines"
,
column:
"pipeline_id"
,
name:
"fk_fb57e6cc56"
,
on_delete: :cascade
add_foreign_key
"ci_stages"
,
"projects"
,
name:
"fk_2360681d1d"
,
on_delete: :cascade
add_foreign_key
"ci_stages"
,
"projects"
,
name:
"fk_2360681d1d"
,
on_delete: :cascade
...
...
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