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

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

class AddPackageMetadataCheckpoints < Gitlab::Database::Migration[2.1]
  def up
    create_table :pm_checkpoints, id: false do |t|
      t.integer :sequence, null: false
      t.timestamps_with_timezone
      t.integer :purl_type, null: false, primary_key: true
      t.integer :chunk, null: false, limit: 2
    end

    change_column(:pm_checkpoints, :purl_type, :integer, limit: 2)
    drop_sequence(:pm_checkpoints, :purl_type, 'pm_checkpoints_purl_type_seq')
  end

  def down
    drop_table :pm_checkpoints
  end
end