Commit 7ec3077d authored by Patrick Bair's avatar Patrick Bair

Merge branch 'pedropombeiro/348299/1-add-notes-field' into 'master'

Add maintainer_note field to CI runners table

See merge request gitlab-org/gitlab!77767
parents f46953d4 0ecabcff
...@@ -210,6 +210,8 @@ module Ci ...@@ -210,6 +210,8 @@ module Ci
validates :config, json_schema: { filename: 'ci_runner_config' } validates :config, json_schema: { filename: 'ci_runner_config' }
validates :maintainer_note, length: { maximum: 255 }
# Searches for runners matching the given query. # Searches for runners matching the given query.
# #
# This method uses ILIKE on PostgreSQL for the description field and performs a full match on tokens. # This method uses ILIKE on PostgreSQL for the description field and performs a full match on tokens.
......
# frozen_string_literal: true
class AddMaintainerNoteToCiRunners < Gitlab::Database::Migration[1.0]
enable_lock_retries!
def change
# rubocop:disable Migration/AddLimitToTextColumns
# limit is added in 20220111095007_add_text_limit_to_ci_runners_maintainer_note.rb
add_column :ci_runners, :maintainer_note, :text
# rubocop:enable Migration/AddLimitToTextColumns
end
end
# frozen_string_literal: true
class AddTextLimitToCiRunnersMaintainerNote < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
def up
add_text_limit :ci_runners, :maintainer_note, 255
end
def down
remove_text_limit :ci_runners, :maintainer_note
end
end
0bc00cc8a5fa7cafa665ec113a4d0d1384c5acde37dfdf53ab1f5a2e1d6acb02
\ No newline at end of file
65259b0e71c1883b81c61354325cfeeade0013b55af8901bf707f2a94ee3a46a
\ No newline at end of file
...@@ -12177,7 +12177,9 @@ CREATE TABLE ci_runners ( ...@@ -12177,7 +12177,9 @@ CREATE TABLE ci_runners (
public_projects_minutes_cost_factor double precision DEFAULT 0.0 NOT NULL, public_projects_minutes_cost_factor double precision DEFAULT 0.0 NOT NULL,
private_projects_minutes_cost_factor double precision DEFAULT 1.0 NOT NULL, private_projects_minutes_cost_factor double precision DEFAULT 1.0 NOT NULL,
config jsonb DEFAULT '{}'::jsonb NOT NULL, config jsonb DEFAULT '{}'::jsonb NOT NULL,
executor_type smallint executor_type smallint,
maintainer_note text,
CONSTRAINT check_56f5ea8804 CHECK ((char_length(maintainer_note) <= 255))
); );
CREATE SEQUENCE ci_runners_id_seq CREATE SEQUENCE ci_runners_id_seq
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