Commit e506176d authored by Adam Hegyi's avatar Adam Hegyi

Merge branch '210570-add-cost-factors-to-ci-runners' into 'master'

Add cost factor fields to ci runners

See merge request gitlab-org/gitlab!27666
parents adfd65e5 27da8ced
---
title: Add cost factor fields to ci runners
merge_request: 27666
author:
type: added
# frozen_string_literal: true
class AddCostFactorFiledsToCiRunners < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_column_with_default(:ci_runners, :public_projects_minutes_cost_factor, :float, allow_null: false, default: 0.0)
add_column_with_default(:ci_runners, :private_projects_minutes_cost_factor, :float, allow_null: false, default: 1.0)
end
def down
remove_column(:ci_runners, :public_projects_minutes_cost_factor)
remove_column(:ci_runners, :private_projects_minutes_cost_factor)
end
end
......@@ -1310,7 +1310,9 @@ CREATE TABLE public.ci_runners (
ip_address character varying,
maximum_timeout integer,
runner_type smallint NOT NULL,
token_encrypted character varying
token_encrypted character varying,
public_projects_minutes_cost_factor double precision DEFAULT 0.0 NOT NULL,
private_projects_minutes_cost_factor double precision DEFAULT 1.0 NOT NULL
);
CREATE SEQUENCE public.ci_runners_id_seq
......@@ -12787,6 +12789,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20200318175008'),
('20200319123041'),
('20200319203901'),
('20200320112455'),
('20200320123839'),
('20200323075043'),
('20200323122201'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment