Skip to content

Commit

Permalink
Db: Fix current week timeframe end
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Aug 28, 2024
1 parent 239dd71 commit a22a39f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions schema/mysql-upgrades/1.1.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE timeframe SET end = 'now' WHERE name = 'Current Week';
2 changes: 1 addition & 1 deletion schema/mysql.schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ INSERT INTO timeframe (name, title, start, end, ctime, mtime) VALUES
('One Year', null, '-1 year', 'now', UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000),
('Current Day', null, 'midnight', 'now', UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000),
('Last Day', null, 'yesterday midnight', 'yesterday 23:59:59', UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000),
('Current Week', null, 'monday this week midnight', 'sunday this week 23:59:59', UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000),
('Current Week', null, 'monday this week midnight', 'now', UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000),
('Last Week', null, 'monday last week midnight', 'sunday last week 23:59:59', UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000),
('Current Month', null, 'first day of this month midnight', 'now', UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000),
('Last Month', null, 'first day of last month midnight', 'last day of last month 23:59:59', UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000),
Expand Down
1 change: 1 addition & 0 deletions schema/pgsql-upgrades/1.1.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE timeframe SET end = 'now' WHERE name = 'Current Week';
2 changes: 1 addition & 1 deletion schema/pgsql.schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ INSERT INTO timeframe (name, title, start, "end") VALUES
('One Year', null, '-1 year', 'now'),
('Current Day', null, 'midnight', 'now'),
('Last Day', null, 'yesterday midnight', 'yesterday 23:59:59'),
('Current Week', null, 'monday this week midnight', 'sunday this week 23:59:59'),
('Current Week', null, 'monday this week midnight', 'now'),
('Last Week', null, 'monday last week midnight', 'sunday last week 23:59:59'),
('Current Month', null, 'first day of this month midnight', 'now'),
('Last Month', null, 'first day of last month midnight', 'last day of last month 23:59:59'),
Expand Down

0 comments on commit a22a39f

Please sign in to comment.