Commit 87ff4029 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Make package migrations pass [ci skip]

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 5ffae25a
class CreatePackagesPackageFiles < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def change
create_table :packages_package_files do |t|
t.references :package, index: true, foreign_key: { on_delete: :cascade }, null: false
t.references :package, index: true, null: false
t.string :file
t.integer :file_type
t.integer :file_store
......@@ -13,5 +17,9 @@ class CreatePackagesPackageFiles < ActiveRecord::Migration
t.timestamps null: false
end
add_concurrent_foreign_key :packages_package_files, :packages_packages,
column: :package_id,
on_delete: :cascade
end
end
class CreatePackagesMavenMetadata < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def change
create_table :packages_maven_metadata do |t|
t.references :package, index: true, foreign_key: { on_delete: :cascade }, null: false
t.references :package, index: true, null: false
t.string :app_group, null: false
t.string :app_name, null: false
t.string :app_version, null: false
t.timestamps null: false
end
add_concurrent_foreign_key :packages_maven_metadata, :packages_packages,
column: :package_id,
on_delete: :cascade
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment