Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 17:34:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-20 17:34:42 +0300
commit9f46488805e86b1bc341ea1620b866016c2ce5ed (patch)
treef9748c7e287041e37d6da49e0a29c9511dc34768 /db/migrate/20200407222647_create_project_repository_storage_moves.rb
parentdfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff)
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'db/migrate/20200407222647_create_project_repository_storage_moves.rb')
-rw-r--r--db/migrate/20200407222647_create_project_repository_storage_moves.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/db/migrate/20200407222647_create_project_repository_storage_moves.rb b/db/migrate/20200407222647_create_project_repository_storage_moves.rb
new file mode 100644
index 00000000000..402a1cdd4a6
--- /dev/null
+++ b/db/migrate/20200407222647_create_project_repository_storage_moves.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+class CreateProjectRepositoryStorageMoves < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ create_table :project_repository_storage_moves do |t|
+ t.timestamps_with_timezone
+ t.integer :project_id, limit: 8, null: false
+ t.integer :state, limit: 2, default: 1, null: false
+ t.text :source_storage_name, null: false
+ t.text :destination_storage_name, null: false
+ end
+
+ add_index :project_repository_storage_moves, :project_id
+
+ add_text_limit(:project_repository_storage_moves, :source_storage_name, 255, constraint_name: 'project_repository_storage_moves_source_storage_name')
+ add_text_limit(:project_repository_storage_moves, :destination_storage_name, 255, constraint_name: 'project_repository_storage_moves_destination_storage_name')
+ end
+
+ def down
+ remove_check_constraint(:project_repository_storage_moves, 'project_repository_storage_moves_source_storage_name')
+ remove_check_constraint(:project_repository_storage_moves, 'project_repository_storage_moves_destination_storage_name')
+
+ drop_table :project_repository_storage_moves
+ end
+end