diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-22 00:07:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-22 00:07:34 +0300 |
commit | 909dcab6e1f82095408cf4adfe099b463f094301 (patch) | |
tree | d8b4ee0cf1a5313b75c7b039ae52b74d03c6bfd6 /db/migrate | |
parent | d2f2219fd58e572c10d77183e2f65de8fcc8df96 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
3 files changed, 58 insertions, 0 deletions
diff --git a/db/migrate/20231205165049_add_slug_to_topics.rb b/db/migrate/20231205165049_add_slug_to_topics.rb new file mode 100644 index 00000000000..dedd871473d --- /dev/null +++ b/db/migrate/20231205165049_add_slug_to_topics.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddSlugToTopics < Gitlab::Database::Migration[2.2] + disable_ddl_transaction! + + milestone '16.8' + + def up + with_lock_retries do + add_column :topics, :slug, :text, if_not_exists: true + end + + add_text_limit :topics, :slug, 255 + end + + def down + with_lock_retries do + remove_column :topics, :slug, if_exists: true + end + end +end diff --git a/db/migrate/20231213065249_deprecate_ci_editor_ai_conversation_related_workers.rb b/db/migrate/20231213065249_deprecate_ci_editor_ai_conversation_related_workers.rb new file mode 100644 index 00000000000..f0dd4775eb1 --- /dev/null +++ b/db/migrate/20231213065249_deprecate_ci_editor_ai_conversation_related_workers.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class DeprecateCiEditorAiConversationRelatedWorkers < Gitlab::Database::Migration[2.2] + DEPRECATED_JOB_CLASSES = %w[ + Ci::LLM::GenerateConfigWorker + OpenAi::ClearConversationsWorker + ] + + disable_ddl_transaction! + + milestone '16.8' + + def up + sidekiq_remove_jobs(job_klasses: DEPRECATED_JOB_CLASSES) + end + + def down + # This migration removes any instances of deprecated workers and cannot be undone. + end +end diff --git a/db/migrate/20231216190018_add_index_topics_on_slug.rb b/db/migrate/20231216190018_add_index_topics_on_slug.rb new file mode 100644 index 00000000000..f83d733c008 --- /dev/null +++ b/db/migrate/20231216190018_add_index_topics_on_slug.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIndexTopicsOnSlug < Gitlab::Database::Migration[2.2] + disable_ddl_transaction! + + milestone '16.8' + + INDEX_NAME = 'index_topics_on_slug' + + def up + add_concurrent_index :topics, :slug, unique: true, where: 'slug IS NOT NULL', name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :topics, name: INDEX_NAME + end +end |