diff --git a/tapdb/sqlc/migrations/000020_asset_unique_key.down.sql b/tapdb/sqlc/migrations/000020_asset_unique_key.down.sql new file mode 100644 index 000000000..d491775ed --- /dev/null +++ b/tapdb/sqlc/migrations/000020_asset_unique_key.down.sql @@ -0,0 +1 @@ +DROP INDEX IF EXISTS assets_genesis_id_script_key_id_anchor_utxo_id_unique; diff --git a/tapdb/sqlc/migrations/000020_asset_unique_key.up.sql b/tapdb/sqlc/migrations/000020_asset_unique_key.up.sql new file mode 100644 index 000000000..c5d0f5581 --- /dev/null +++ b/tapdb/sqlc/migrations/000020_asset_unique_key.up.sql @@ -0,0 +1,4 @@ +CREATE UNIQUE INDEX assets_genesis_id_script_key_id_anchor_utxo_id_unique +ON assets ( + genesis_id, script_key_id, anchor_utxo_id +);