diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-16 13:42:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-16 13:42:19 +0300 |
commit | 84d1bd786125c1c14a3ba5f63e38a4cc736a9027 (patch) | |
tree | f550fa965f507077e20dbb6d61a8269a99ef7107 /db/post_migrate/20231213064314_remove_ci_editor_ai_conversation_messages_table.rb | |
parent | 3a105e36e689f7b75482236712f1a47fd5a76814 (diff) |
Add latest changes from gitlab-org/gitlab@16-8-stable-eev16.8.0-rc42
Diffstat (limited to 'db/post_migrate/20231213064314_remove_ci_editor_ai_conversation_messages_table.rb')
-rw-r--r-- | db/post_migrate/20231213064314_remove_ci_editor_ai_conversation_messages_table.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/db/post_migrate/20231213064314_remove_ci_editor_ai_conversation_messages_table.rb b/db/post_migrate/20231213064314_remove_ci_editor_ai_conversation_messages_table.rb new file mode 100644 index 00000000000..b108805a22d --- /dev/null +++ b/db/post_migrate/20231213064314_remove_ci_editor_ai_conversation_messages_table.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +class RemoveCiEditorAiConversationMessagesTable < Gitlab::Database::Migration[2.2] + milestone '16.8' + + def up + drop_table :ci_editor_ai_conversation_messages, if_exists: true + end + + def down + create_table :ci_editor_ai_conversation_messages do |t| + t.bigint :user_id, + null: false + t.bigint :project_id, + null: false + t.timestamps_with_timezone null: false + t.text :role, limit: 100, + null: false + t.text :content, limit: 16384, + null: true + t.text :async_errors, array: true, null: false, default: [] + + t.index [:user_id, :project_id, :created_at], + name: :index_ci_editor_ai_messages_on_user_project_and_created_at + + t.index :project_id, + name: :index_ci_editor_ai_messages_project_id + + t.index :created_at, + name: :index_ci_editor_ai_messages_created_at + end + end +end |