forked from owasp-amass/asset-db
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(migrations): add index to relations for asset_from and asset_to
Closes owasp-amass#30
- Loading branch information
Showing
3 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |