-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shortlnik-link: refactoring migration
Signed-off-by: Victor Login <[email protected]>
- Loading branch information
Showing
26 changed files
with
21 additions
and
23 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...es/link/infrastructure/store/crud/postgres/migrations/0000001_create_links_table.down.sql
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 +1 @@ | ||
DROP TABLE IF EXISTS links; | ||
DROP TABLE IF EXISTS shortlink.links; |
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
2 changes: 1 addition & 1 deletion
2
...ervices/link/infrastructure/store/crud/postgres/migrations/0000002_add_test_link.down.sql
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,7 +1,7 @@ | ||
BEGIN | ||
ISOLATION LEVEL READ COMMITTED; | ||
|
||
DELETE FROM links | ||
DELETE FROM shortlink.links | ||
WHERE hash IN ("myHash1", "myHash2", "myHash3") | ||
|
||
COMMIT; |
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
4 changes: 2 additions & 2 deletions
4
...s/link/infrastructure/store/crud/postgres/migrations/0000003_improve_links_table.down.sql
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,7 +1,7 @@ | ||
BEGIN | ||
ISOLATION LEVEL READ COMMITTED; | ||
|
||
ALTER TABLE links DROP COLUMN created_at; | ||
ALTER TABLE links DROP COLUMN updated_at; | ||
ALTER TABLE shortlink.links DROP COLUMN created_at; | ||
ALTER TABLE shortlink.links DROP COLUMN updated_at; | ||
|
||
COMMIT; |
4 changes: 2 additions & 2 deletions
4
...ces/link/infrastructure/store/crud/postgres/migrations/0000003_improve_links_table.up.sql
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,10 +1,10 @@ | ||
BEGIN | ||
ISOLATION LEVEL READ COMMITTED; | ||
|
||
ALTER TABLE links | ||
ALTER TABLE shortlink.links | ||
ADD created_at TIMESTAMP DEFAULT current_timestamp; | ||
|
||
ALTER TABLE links | ||
ALTER TABLE shortlink.links | ||
ADD updated_at TIMESTAMP DEFAULT current_timestamp; | ||
|
||
COMMIT; |
6 changes: 0 additions & 6 deletions
6
...services/link/infrastructure/store/crud/postgres/migrations/0000004_cqrs_link_view.up.sql
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
2 changes: 0 additions & 2 deletions
2
...nfrastructure/store/crud/postgres/migrations/0000005_move_link_to_schema_shortlink.up.sql
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
internal/services/link/infrastructure/store/crud/postgres/migrations/000008_hot_cache.up.sql
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 @@ | ||
CREATE EXTENSION IF NOT EXISTS pg_prewarm; |
1 change: 0 additions & 1 deletion
1
internal/services/link/infrastructure/store/crud/postgres/migrations/000009_hot_cache.up.sql
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.