From 0970e7b9608d6ada1c0fe45242ea092ea91068aa Mon Sep 17 00:00:00 2001 From: Dylan Griffith Date: Wed, 2 May 2018 17:43:20 +0200 Subject: Rename RunnerGroup -> RunnerNamespace --- db/migrate/20170301101006_add_ci_runner_namespaces.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 db/migrate/20170301101006_add_ci_runner_namespaces.rb (limited to 'db/migrate/20170301101006_add_ci_runner_namespaces.rb') 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 -- cgit v1.2.1