debian-mirror-gitlab/db/migrate/20230119215436_add_package_metadata_checkpoints.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
553 B
Ruby
Raw Normal View History

2023-04-23 21:23:45 +05:30
# 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