"Fix" datetime generation in db
This commit is contained in:
5
food.ddl
5
food.ddl
@@ -2,7 +2,7 @@ begin;
|
|||||||
|
|
||||||
create table weight (
|
create table weight (
|
||||||
id integer primary key,
|
id integer primary key,
|
||||||
date datetime default (datetime('now', '+2 hours')),
|
date datetime default (datetime('now')),
|
||||||
weight real not null
|
weight real not null
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ order by date desc;
|
|||||||
|
|
||||||
create table food(
|
create table food(
|
||||||
id integer primary key,
|
id integer primary key,
|
||||||
date datetime default (datetime('now', '+2 hours')),
|
date datetime default (datetime('now')),
|
||||||
food varchar not null,
|
food varchar not null,
|
||||||
description varchar,
|
description varchar,
|
||||||
amount real not null,
|
amount real not null,
|
||||||
@@ -100,7 +100,6 @@ where word = old.food
|
|||||||
and rank <= 0;
|
and rank <= 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
drop trigger if exists food_foodfix_update;
|
drop trigger if exists food_foodfix_update;
|
||||||
create trigger food_foodfix_update AFTER
|
create trigger food_foodfix_update AFTER
|
||||||
update on food for EACH row
|
update on food for EACH row
|
||||||
|
Reference in New Issue
Block a user