X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fres%2Fraw%2Fsql_58.sql;h=b2b687c587e1158c0f3c4bfa575d724b87bd5085;hp=ab3d08865146330ed513aab66d2e9c2c837e05ff;hb=32ef1438acbd5328433be04668362402e26095cb;hpb=3e01d1b42b99c9fce426df1750c0fae5a8fd0f0a diff --git a/app/src/main/res/raw/sql_58.sql b/app/src/main/res/raw/sql_58.sql index ab3d0886..b2b687c5 100644 --- a/app/src/main/res/raw/sql_58.sql +++ b/app/src/main/res/raw/sql_58.sql @@ -93,6 +93,33 @@ select description, description_upper, generation from description_history; drop table description_history; alter table description_history_new rename to description_history; +-- transactions + +create table transactions_new( + profile varchar not null, + id integer not null, + data_hash varchar not null, + year integer not null, + month integer not null, + day integer not null, + description varchar collate NOCASE not null, + comment varchar, + generation integer not null default 0, + primary key(profile,id)); + +insert into transactions_new(profile, id, data_hash, year, month, day, description, + comment, generation) +select profile, id, data_hash, year, month, day, description, + comment, generation +from transactions; + +drop table transactions; +alter table transactions_new rename to transactions; + +create unique index un_transactions_data_hash on transactions(profile,data_hash); +create index idx_transaction_description on transactions(description); + + COMMIT TRANSACTION; PRAGMA foreign_keys = ON; \ No newline at end of file