debian-mirror-gitlab/db/migrate/20210720140841_create_postgres_async_indexes_table.rb

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

28 lines
621 B
Ruby
Raw Normal View History

2021-10-27 15:23:28 +05:30
# frozen_string_literal: true
class CreatePostgresAsyncIndexesTable < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
2022-04-04 11:22:00 +05:30
def up
2021-10-27 15:23:28 +05:30
create_table_with_constraints :postgres_async_indexes do |t|
t.timestamps_with_timezone null: false
t.text :name, null: false
t.text :definition, null: false
t.text :table_name, null: false
t.text_limit :name, 63
t.text_limit :definition, 2048
t.text_limit :table_name, 63
t.index :name, unique: true
end
end
2022-04-04 11:22:00 +05:30
def down
with_lock_retries do
drop_table :postgres_async_indexes
end
end
2021-10-27 15:23:28 +05:30
end