Files
gitlab-foss/db/migrate/20240429182325_create_custom_software_licenses_table.rb
2025-06-27 06:12:10 +00:00

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