mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 21:43:12 +12:00
059837651d
improvement: separate out concurrent index creations and do them in a separate transaction
22 lines
No EOL
614 B
Elixir
22 lines
No EOL
614 B
Elixir
defmodule AshPostgres.TestRepo.Migrations.MigrateResources5 do
|
|
@moduledoc """
|
|
Updates resources based on their most recent snapshots.
|
|
|
|
This file was autogenerated with `mix ash_postgres.generate_migrations`
|
|
"""
|
|
|
|
use Ecto.Migration
|
|
|
|
@disable_ddl_transaction true
|
|
@disable_migration_lock true
|
|
|
|
def up do
|
|
create index(:posts, ["uniq_custom_one", "uniq_custom_two"], unique: true, concurrently: true)
|
|
end
|
|
|
|
def down do
|
|
drop_if_exists index(:posts, ["uniq_custom_one", "uniq_custom_two"],
|
|
name: "posts_uniq_custom_one_uniq_custom_two_index"
|
|
)
|
|
end
|
|
end |