Skip to content

Commit

Permalink
Fix index migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihajlo-Pavlovic committed Dec 19, 2024
1 parent 8a37bf3 commit 7b26f01
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export async function up({ context: { queryInterface } }) {
await queryInterface.addIndex('shard', ['blockchain_id'], {
name: 'blockchain_id_index',
name: 'shard_blockchain_id_index',
});

await queryInterface.addIndex('shard', ['last_dialed'], {
name: 'last_dialed_index',
});

await queryInterface.addIndex('service_agreement', ['blockchain_id'], {
name: 'blockchain_id_index',
name: 'service_agreement_blockchain_id_index',
});

await queryInterface.addIndex('service_agreement', ['blockchain_id', 'token_id'], {
Expand Down Expand Up @@ -125,11 +125,11 @@ export async function up({ context: { queryInterface } }) {
}

export async function down({ context: { queryInterface } }) {
await queryInterface.removeIndex('shard', 'blockchain_id_index');
await queryInterface.removeIndex('shard', 'shard_blockchain_id_index');

await queryInterface.removeIndex('shard', 'last_dialed_index');

await queryInterface.removeIndex('service_agreement', 'blockchain_id_index');
await queryInterface.removeIndex('service_agreement', 'service_agreement_blockchain_id_index');

await queryInterface.removeIndex('service_agreement', 'blockchain_id_token_id_index');

Expand Down

0 comments on commit 7b26f01

Please sign in to comment.