mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-15 21:39:00 +00:00
19 lines
449 B
Ruby
19 lines
449 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateCustomSoftwareLicensesTable < Gitlab::Database::Migration[2.2]
|
|
milestone '17.0'
|
|
|
|
def up
|
|
create_table :custom_software_licenses do |t|
|
|
t.references :project, index: false, foreign_key: { on_delete: :cascade }, null: false
|
|
t.text :name, null: false, limit: 255
|
|
|
|
t.index [:project_id, :name], unique: true
|
|
end
|
|
end
|
|
|
|
def down
|
|
drop_table :custom_software_licenses
|
|
end
|
|
end
|