X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fres%2Fraw%2Fsql_55.sql;h=780b451ccdb2cf7673b31b0b6f49666dd243ce23;hp=fb77862a04f59b181af76a12a4dfc512b47dbadc;hb=390a653a4424bd146f73bca3e421a0be252ee443;hpb=81277d1635a9b15fef1614a096d94f8772e40735 diff --git a/app/src/main/res/raw/sql_55.sql b/app/src/main/res/raw/sql_55.sql index fb77862a..780b451c 100644 --- a/app/src/main/res/raw/sql_55.sql +++ b/app/src/main/res/raw/sql_55.sql @@ -14,6 +14,7 @@ -- along with MoLe. If not, see . -- copied from the Room migration +BEGIN TRANSACTION; CREATE TABLE template_accounts_new(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, template_id INTEGER NOT NULL, acc TEXT, position INTEGER NOT NULL, acc_match_group INTEGER, currency INTEGER, currency_match_group INTEGER, amount REAL, amount_match_group INTEGER, comment TEXT, comment_match_group INTEGER, negate_amount INTEGER, FOREIGN KEY(template_id) REFERENCES templates(id) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY(currency) REFERENCES currencies(id) ON UPDATE RESTRICT ON DELETE RESTRICT); insert into template_accounts_new(id, template_id, acc, position, acc_match_group, currency, currency_match_group, amount, amount_match_group, amount, amount_match_group, comment, comment_match_group, negate_amount) select id, template_id, acc, position, acc_match_group, currency, currency_match_group, amount, amount_match_group, amount, amount_match_group, comment, comment_match_group, negate_amount from template_accounts; @@ -22,3 +23,5 @@ alter table template_accounts_new rename to template_accounts; create index fk_template_accounts_template on template_accounts(template_id); create index fk_template_accounts_currency on template_accounts(currency); + +COMMIT TRANSACTION; \ No newline at end of file