debian-mirror-gitlab/db/migrate/20221101194416_create_package_metadata_versions.rb
2023-03-04 22:38:38 +05:30

11 lines
430 B
Ruby

# frozen_string_literal: true
class CreatePackageMetadataVersions < Gitlab::Database::Migration[2.0]
def change
create_table :pm_package_versions do |t|
t.references :pm_package, foreign_key: { to_table: :pm_packages, on_delete: :cascade }
t.text :version, null: false, limit: 255
t.index [:pm_package_id, :version], unique: true, name: 'i_pm_package_versions_on_package_id_and_version'
end
end
end