diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 11:59:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 11:59:07 +0000 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /db/migrate/20201125030847_create_dependency_proxy_manifests.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) | |
download | gitlab-ce-8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca.tar.gz |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'db/migrate/20201125030847_create_dependency_proxy_manifests.rb')
-rw-r--r-- | db/migrate/20201125030847_create_dependency_proxy_manifests.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/db/migrate/20201125030847_create_dependency_proxy_manifests.rb b/db/migrate/20201125030847_create_dependency_proxy_manifests.rb new file mode 100644 index 00000000000..6c1a3f23bf3 --- /dev/null +++ b/db/migrate/20201125030847_create_dependency_proxy_manifests.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +class CreateDependencyProxyManifests < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + with_lock_retries do + create_table :dependency_proxy_manifests, if_not_exists: true do |t| + t.timestamps_with_timezone + t.references :group, index: false, null: false, foreign_key: { to_table: :namespaces, on_delete: :cascade }, type: :bigint + t.bigint :size + t.integer :file_store, limit: 2 + t.text :file_name, null: false + t.text :file, null: false + t.text :digest, null: false + + t.index [:group_id, :digest], name: 'index_dependency_proxy_manifests_on_group_id_and_digest' + end + end + + add_text_limit :dependency_proxy_manifests, :file_name, 255 + add_text_limit :dependency_proxy_manifests, :file, 255 + add_text_limit :dependency_proxy_manifests, :digest, 255 + end + + def down + drop_table :dependency_proxy_manifests + end +end |