Browse Source

set unix timestamp by default

CPP-GTK4
yggverse 2 months ago
parent
commit
5f910bf81b
  1. 4
      src/app/browser/main/tab.cpp
  2. 4
      src/app/browser/main/tab/page.cpp

4
src/app/browser/main/tab.cpp

@ -344,7 +344,7 @@ int Tab::DB::init( @@ -344,7 +344,7 @@ int Tab::DB::init(
CREATE TABLE IF NOT EXISTS `app_browser_main_tab__session`
(
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
`time` INTEGER NOT NULL,
`time` INTEGER NOT NULL DEFAULT CURRENT_TIMESTAMP,
`page_number` INTEGER NOT NULL,
`is_current` INTEGER NOT NULL,
`label_text` VARCHAR(1024)
@ -422,12 +422,10 @@ sqlite3_int64 Tab::DB::add( @@ -422,12 +422,10 @@ sqlite3_int64 Tab::DB::add(
Glib::ustring::sprintf(
R"SQL(
INSERT INTO `app_browser_main_tab__session` (
`time`,
`page_number`,
`is_current`,
`label_text`
) VALUES (
CURRENT_TIMESTAMP,
'%d',
'%d',
'%s'

4
src/app/browser/main/tab/page.cpp

@ -375,7 +375,7 @@ int Page::DB::init( @@ -375,7 +375,7 @@ int Page::DB::init(
CREATE TABLE IF NOT EXISTS `app_browser_main_tab_page__session`
(
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `app_browser_main_tab__session_id` INTEGER NOT NULL,
`time` INTEGER NOT NULL,
`time` INTEGER NOT NULL DEFAULT CURRENT_TIMESTAMP,
`mime` INTEGER NOT NULL,
`title` VARCHAR(1024) NOT NULL,
`description` VARCHAR(1024) NOT NULL
@ -455,13 +455,11 @@ sqlite3_int64 Page::DB::add( @@ -455,13 +455,11 @@ sqlite3_int64 Page::DB::add(
R"SQL(
INSERT INTO `app_browser_main_tab_page__session` (
`app_browser_main_tab__session_id`,
`time`,
`mime`,
`title`,
`description`
) VALUES (
'%d',
CURRENT_TIMESTAMP,
'%d',
'%s',
'%s'

Loading…
Cancel
Save