]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/res/raw/sql_46.sql
let SQL revision files control the transaction
[mobile-ledger.git] / app / src / main / res / raw / sql_46.sql
index a16c34dfbf149e4a2ac1477ff3b92475ddabfc5f..031d201d9d3f64a7e309d1cd0e0f27820e25b5b4 100644 (file)
@@ -1,4 +1,4 @@
--- Copyright © 2020 Damyan Ivanov.
+-- 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
@@ -13,6 +13,8 @@
 -- You should have received a copy of the GNU General Public License
 -- along with MoLe. If not, see <https://www.gnu.org/licenses/>.
 
+BEGIN TRANSACTION;
+
 drop table pattern_accounts;
 drop table patterns;
 
@@ -20,3 +22,5 @@ create table patterns(id integer not null primary key, name text not null, posit
 create unique index un_patterns_id on patterns(id);
 create table pattern_accounts(id integer not null primary key, pattern_id integer not null, position integer not null, acc text, acc_match_group integer, currency integer, currency_match_group integer, amount decimal, amount_match_group integer, comment text, comment_match_group integer, constraint fk_pattern_account_pattern foreign key(pattern_id) references patterns(id), constraint fk_pattern_account_currency foreign key(currency) references currencies(id));
 create unique index un_pattern_accounts on pattern_accounts(id);
+
+COMMIT TRANSACTION;
\ No newline at end of file