Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20230216171309_create_ci_runner_cost_settings.rb')
-rw-r--r--db/migrate/20230216171309_create_ci_runner_cost_settings.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20230216171309_create_ci_runner_cost_settings.rb b/db/migrate/20230216171309_create_ci_runner_cost_settings.rb
new file mode 100644
index 00000000000..5bc624c635a
--- /dev/null
+++ b/db/migrate/20230216171309_create_ci_runner_cost_settings.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class CreateCiRunnerCostSettings < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ create_table :ci_cost_settings, id: false do |t|
+ t.timestamps_with_timezone null: false
+ t.references :runner, null: false, primary_key: true, index: false,
+ foreign_key: { to_table: :ci_runners, on_delete: :cascade },
+ type: :bigint, default: nil
+ t.float :standard_factor, null: false, default: 1.00
+ t.float :os_contribution_factor, null: false, default: 0.008
+ t.float :os_plan_factor, null: false, default: 0.5
+ end
+ end
+end