diff options
Diffstat (limited to 'db/migrate/20230524012641_add_vertex_ai_host_to_application_settings.rb')
-rw-r--r-- | db/migrate/20230524012641_add_vertex_ai_host_to_application_settings.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20230524012641_add_vertex_ai_host_to_application_settings.rb b/db/migrate/20230524012641_add_vertex_ai_host_to_application_settings.rb new file mode 100644 index 00000000000..99f178959ee --- /dev/null +++ b/db/migrate/20230524012641_add_vertex_ai_host_to_application_settings.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddVertexAiHostToApplicationSettings < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + def up + with_lock_retries do + add_column :application_settings, :vertex_ai_host, :text, if_not_exists: true + end + + add_text_limit :application_settings, :vertex_ai_host, 255 + end + + def down + remove_text_limit :application_settings, :vertex_ai_host + + with_lock_retries do + remove_column :application_settings, :vertex_ai_host, if_exists: true + end + end +end |