X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;ds=sidebyside;f=app%2Fsrc%2Fmain%2Fres%2Fraw%2Fsql_55.sql;fp=app%2Fsrc%2Fmain%2Fres%2Fraw%2Fsql_55.sql;h=0000000000000000000000000000000000000000;hb=9ea5a330029c99e0eecf55aaa94d8689fa64fc92;hp=780b451ccdb2cf7673b31b0b6f49666dd243ce23;hpb=d5218337e111a377a3661f0ae4a5049edc055705;p=mobile-ledger.git diff --git a/app/src/main/res/raw/sql_55.sql b/app/src/main/res/raw/sql_55.sql deleted file mode 100644 index 780b451c..00000000 --- a/app/src/main/res/raw/sql_55.sql +++ /dev/null @@ -1,27 +0,0 @@ --- Copyright © 2021 Damyan Ivanov. --- This file is part of MoLe. --- MoLe is free software: you can distribute it and/or modify it --- under the term of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your opinion), any later version. --- --- MoLe is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License terms for details. --- --- You should have received a copy of the GNU General Public License --- 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; -drop table template_accounts; -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