X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;ds=sidebyside;f=app%2Fsrc%2Fmain%2Fres%2Fraw%2Fsql_58.sql;h=ab3d08865146330ed513aab66d2e9c2c837e05ff;hb=b2f4ea6b9b96cda1c04afc54c152049025d99d80;hp=066f22835bb3165f27e9756b5903568a28c49ac8;hpb=e28b8296d155c404cc5a702b3b477c41915d73dc;p=mobile-ledger.git diff --git a/app/src/main/res/raw/sql_58.sql b/app/src/main/res/raw/sql_58.sql index 066f2283..ab3d0886 100644 --- a/app/src/main/res/raw/sql_58.sql +++ b/app/src/main/res/raw/sql_58.sql @@ -65,6 +65,34 @@ drop table options; alter table options_new rename to options; +create table account_values_new( + profile varchar not null, + account varchar not null, + currency varchar not null default '', + value real not null, + generation integer not null default 0, + primary key(profile, account, currency)); + +insert into account_values_new( + profile, account, currency, value, generation) +select profile, account, currency, value, generation +from account_values; + +drop table account_values; +alter table account_values_new rename to account_values; + +create table description_history_new( + description varchar collate NOCASE not null primary key, + description_upper varchar not null, + generation integer not null default 0, + primary key(description)); + +insert into description_history_new(description, description_upper, generation) +select description, description_upper, generation from description_history; + +drop table description_history; +alter table description_history_new rename to description_history; + COMMIT TRANSACTION; PRAGMA foreign_keys = ON; \ No newline at end of file