Skip to content

Commit

Permalink
feat(migrations): add index to relations for asset_from and asset_to
Browse files Browse the repository at this point in the history
  • Loading branch information
rynmrtn committed Apr 20, 2024
1 parent 53f9062 commit ae15673
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion migrations/postgres/008_rel_type_idx.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- +migrate Up
CREATE INDEX idx_rel_type ON relations (type);
CREATE INDEX IF NOT EXISTS idx_rel_type ON relations (type);

-- +migrate Down
DROP INDEX IF EXISTS idx_rel_type;
7 changes: 7 additions & 0 deletions migrations/postgres/009_rel_asset_id_idx.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- +migrate Up
CREATE INDEX IF NOT EXISTS idx_rel_from_asset ON relations (from_asset_id);
CREATE INDEX IF NOT EXISTS idx_rel_to_asset ON relations (to_asset_id);

-- +migrate Down
DROP INDEX IF EXISTS idx_rel_from_asset;
DROP INDEX IF EXISTS idx_rel_to_asset;
7 changes: 7 additions & 0 deletions migrations/sqlite3/007_rel_asset_id_idx.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- +migrate Up
CREATE INDEX idx_rel_from_asset ON relations (from_asset_id);
CREATE INDEX idx_rel_to_asset ON relations (to_asset_id);

-- +migrate Down
DROP INDEX IF EXISTS idx_rel_from_asset;
DROP INDEX IF EXISTS idx_rel_to_asset;

0 comments on commit ae15673

Please sign in to comment.