Fix broken init script
This commit is contained in:
5
food.ddl
5
food.ddl
@@ -1,4 +1,4 @@
|
||||
begin transaction;
|
||||
begin;
|
||||
|
||||
create table weight (
|
||||
date datetime default (datetime('now', '+2 hours')),
|
||||
@@ -124,7 +124,6 @@ where not exists (
|
||||
);
|
||||
end;
|
||||
|
||||
-- Spellfix search example
|
||||
with search_results as (
|
||||
select word, score, f.rowid, f.*
|
||||
from foodfix
|
||||
@@ -134,7 +133,7 @@ with search_results as (
|
||||
select rowid, food, score, date, description, amount, per100, energy
|
||||
from search_results
|
||||
group by food
|
||||
order by score asc, date desc
|
||||
order by score asc, date desc;
|
||||
|
||||
create index dailyIdx on food(strftime('%Y-%m-%d', date));
|
||||
create index weeklyIdx on food(strftime('%Y-%W', date));
|
||||
|
Reference in New Issue
Block a user