From d2d3adc5ccb15292e83823be303073ebbcef1c1a Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Fri, 31 May 2024 14:32:02 -0400 Subject: [PATCH] sqlite schema tweaks for bandwidth_limit_journal (#606) --- .../sql/sqlite3/025_v0_4_31_bandwidth_limit_journal.sql | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/controller/store/sql/sqlite3/025_v0_4_31_bandwidth_limit_journal.sql b/controller/store/sql/sqlite3/025_v0_4_31_bandwidth_limit_journal.sql index 6d9bd0fe..ffa03abb 100644 --- a/controller/store/sql/sqlite3/025_v0_4_31_bandwidth_limit_journal.sql +++ b/controller/store/sql/sqlite3/025_v0_4_31_bandwidth_limit_journal.sql @@ -11,6 +11,8 @@ create table bandwidth_limit_journal ( action string not null, rx_bytes bigint not null, tx_bytes bigint not null, - created_at timestamptz not null default(current_timestamp), - updated_at timestamptz not null default(current_timestamp) -); \ No newline at end of file + created_at timestamptz not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')), + updated_at timestamptz not null default(strftime('%Y-%m-%d %H:%M:%f', 'now')) +); + +create index bandwidth_limit_journal_account_id_idx on bandwidth_limit_journal (account_id); \ No newline at end of file