-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add created_at_day generated column for earnings
- Loading branch information
Showing
5 changed files
with
5 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
migrations/2024-09-21-202059_earnings_add_created_at_day_generated_column/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 |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE earnings DROP COLUMN created_at_day |
1 change: 1 addition & 0 deletions
1
migrations/2024-09-21-202059_earnings_add_created_at_day_generated_column/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 @@ | ||
ALTER TABLE earnings ADD COLUMN created_at_day DATE generated always AS (DATE(created_at)) |
1 change: 1 addition & 0 deletions
1
migrations/2024-09-21-203337_idx_earnings_miner_id_created_at_day/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 |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE earnings DROP INDEX idx_earnings_miner_id_created_at_day |
1 change: 1 addition & 0 deletions
1
migrations/2024-09-21-203337_idx_earnings_miner_id_created_at_day/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 INDEX idx_earnings_miner_id_created_at_day ON earnings (miner_id, created_at_day) |
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