summaryrefslogtreecommitdiff
path: root/db/migrate/20190828172831_create_package_tag.rb
blob: 3d26b7ce6025ab264b0962cf89d4913258dd259d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true .

class CreatePackageTag < ActiveRecord::Migration[5.2]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def change
    create_table :packages_package_tags do |t|
      t.references :package, index: true, null: false, foreign_key: { to_table: :packages_packages, on_delete: :cascade }, type: :integer
      t.string :name, limit: 255, null: false # rubocop:disable Migration/PreventStrings
    end
  end
end