Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20200318183553_create_pypi_package_metadata.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6ebe70da643919cb8f7dcac09b248afece3c150f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

class CreatePypiPackageMetadata < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def change
    create_table :packages_pypi_metadata, id: false do |t|
      t.references :package, primary_key: true, index: false, default: nil, foreign_key: { to_table: :packages_packages, on_delete: :cascade }, type: :bigint
      t.string "required_python", null: false, limit: 50 # rubocop:disable Migration/PreventStrings
    end
  end
end