diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-02 17:43:20 +0200 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-02 17:43:20 +0200 |
commit | 0970e7b9608d6ada1c0fe45242ea092ea91068aa (patch) | |
tree | 79b16801413032e669f8369ee111561f152ff923 /db/migrate/20170301101006_add_ci_runner_namespaces.rb | |
parent | 2261188f48dff25c5bfbbca739c5f570849155f4 (diff) | |
download | gitlab-ce-0970e7b9608d6ada1c0fe45242ea092ea91068aa.tar.gz |
Rename RunnerGroup -> RunnerNamespace
Diffstat (limited to 'db/migrate/20170301101006_add_ci_runner_namespaces.rb')
-rw-r--r-- | db/migrate/20170301101006_add_ci_runner_namespaces.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20170301101006_add_ci_runner_namespaces.rb b/db/migrate/20170301101006_add_ci_runner_namespaces.rb new file mode 100644 index 00000000000..7e7df2f4d22 --- /dev/null +++ b/db/migrate/20170301101006_add_ci_runner_namespaces.rb @@ -0,0 +1,19 @@ +class AddCiRunnerNamespaces < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def change + create_table :ci_runner_namespaces do |t| + t.integer :runner_id + t.integer :namespace_id + + t.index [:runner_id, :namespace_id], unique: true + t.index :namespace_id + t.foreign_key :ci_runners, column: :runner_id, on_delete: :cascade + t.foreign_key :namespaces, column: :namespace_id, on_delete: :cascade + end + end +end |