Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(migrations): relations last_seen_at index #31

Merged
merged 2 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions migrations/postgres/006_relations_indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ CREATE INDEX idx_rel_last_seen ON assets (last_seen);

-- +migrate Down

DROP INDEX idx_rel_created_at;
DROP INDEX idx_rel_last_seen;
DROP INDEX IF EXISTS idx_rel_created_at;
DROP INDEX IF EXISTS idx_rel_last_seen;
8 changes: 8 additions & 0 deletions migrations/postgres/007_relations_indexes.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- +migrate Up

DROP INDEX IF EXISTS idx_rel_last_seen;
CREATE INDEX idx_rel_last_seen ON relations (last_seen);

-- +migrate Down

DROP INDEX IF EXISTS idx_rel_last_seen;
5 changes: 5 additions & 0 deletions migrations/postgres/008_rel_type_idx.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- +migrate Up
CREATE INDEX idx_rel_type ON relations (type);

-- +migrate Down
DROP INDEX IF EXISTS idx_rel_type;
5 changes: 5 additions & 0 deletions migrations/sqlite3/006_rel_type_idx.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- +migrate Up
CREATE INDEX idx_rel_type ON relations (type);

-- +migrate Down
DROP INDEX IF EXISTS idx_rel_type;
Loading