From 81277d1635a9b15fef1614a096d94f8772e40735 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Thu, 11 Feb 2021 21:54:21 +0000 Subject: [PATCH] add missing/fix copyright statements to all SQL revision files --- app/src/main/res/raw/create_db.sql | 2 +- app/src/main/res/raw/sql_0.sql | 15 +++++++++++++++ app/src/main/res/raw/sql_1.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_10.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_11.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_12.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_13.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_14.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_15.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_16.sql | 18 +++++++++++++++++- app/src/main/res/raw/sql_17.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_18.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_19.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_2.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_20.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_21.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_22.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_23.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_24.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_25.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_26.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_27.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_28.sql | 18 +++++++++++++++++- app/src/main/res/raw/sql_29.sql | 16 +++++++++++++++- app/src/main/res/raw/sql_3.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_30.sql | 16 +++++++++++++++- app/src/main/res/raw/sql_31.sql | 16 +++++++++++++++- app/src/main/res/raw/sql_32.sql | 16 +++++++++++++++- app/src/main/res/raw/sql_33.sql | 16 +++++++++++++++- app/src/main/res/raw/sql_38.sql | 2 +- app/src/main/res/raw/sql_39.sql | 2 +- app/src/main/res/raw/sql_4.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_40.sql | 2 +- app/src/main/res/raw/sql_41.sql | 2 +- app/src/main/res/raw/sql_42.sql | 2 +- app/src/main/res/raw/sql_43.sql | 5 +++-- app/src/main/res/raw/sql_44.sql | 4 ++-- app/src/main/res/raw/sql_45.sql | 2 +- app/src/main/res/raw/sql_46.sql | 2 +- app/src/main/res/raw/sql_47.sql | 2 +- app/src/main/res/raw/sql_48.sql | 2 +- app/src/main/res/raw/sql_49.sql | 2 +- app/src/main/res/raw/sql_5.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_50.sql | 5 +++-- app/src/main/res/raw/sql_51.sql | 4 ++-- app/src/main/res/raw/sql_52.sql | 4 ++-- app/src/main/res/raw/sql_53.sql | 5 +++-- app/src/main/res/raw/sql_54.sql | 4 ++-- app/src/main/res/raw/sql_55.sql | 2 +- app/src/main/res/raw/sql_6.sql | 15 +++++++++++++++ app/src/main/res/raw/sql_7.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_8.sql | 17 ++++++++++++++++- app/src/main/res/raw/sql_9.sql | 17 ++++++++++++++++- 53 files changed, 568 insertions(+), 58 deletions(-) diff --git a/app/src/main/res/raw/create_db.sql b/app/src/main/res/raw/create_db.sql index af9ee1ac..6b56953f 100644 --- a/app/src/main/res/raw/create_db.sql +++ b/app/src/main/res/raw/create_db.sql @@ -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 diff --git a/app/src/main/res/raw/sql_0.sql b/app/src/main/res/raw/sql_0.sql index 3d05c510..3e4feca2 100644 --- a/app/src/main/res/raw/sql_0.sql +++ b/app/src/main/res/raw/sql_0.sql @@ -1,3 +1,18 @@ +-- Copyright © 2018 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 . + create table if not exists accounts(name varchar); create index if not exists idx_accounts_name on accounts(name); create table if not exists options(name varchar, value varchar); diff --git a/app/src/main/res/raw/sql_1.sql b/app/src/main/res/raw/sql_1.sql index 2dfa1417..b5d79f9a 100644 --- a/app/src/main/res/raw/sql_1.sql +++ b/app/src/main/res/raw/sql_1.sql @@ -1,2 +1,17 @@ +-- Copyright © 2018 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 . + alter table accounts add keep boolean; -alter table account_values add keep boolean; \ No newline at end of file +alter table account_values add keep boolean; diff --git a/app/src/main/res/raw/sql_10.sql b/app/src/main/res/raw/sql_10.sql index 48e7b790..30962d41 100644 --- a/app/src/main/res/raw/sql_10.sql +++ b/app/src/main/res/raw/sql_10.sql @@ -1,2 +1,17 @@ +-- Copyright © 2018 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 . + delete from transaction_accounts; -delete from transactions; \ No newline at end of file +delete from transactions; diff --git a/app/src/main/res/raw/sql_11.sql b/app/src/main/res/raw/sql_11.sql index 356aa16c..eec8c3f5 100644 --- a/app/src/main/res/raw/sql_11.sql +++ b/app/src/main/res/raw/sql_11.sql @@ -1,2 +1,17 @@ +-- Copyright © 2019 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 . + create table profiles(uuid varchar not null primary key, name not null, url not null, use_authentication boolean not null, auth_user varchar, auth_password varchar); -create unique index un_profile_name on profiles(name); \ No newline at end of file +create unique index un_profile_name on profiles(name); diff --git a/app/src/main/res/raw/sql_12.sql b/app/src/main/res/raw/sql_12.sql index f64bc5ad..4ddd98dc 100644 --- a/app/src/main/res/raw/sql_12.sql +++ b/app/src/main/res/raw/sql_12.sql @@ -1 +1,16 @@ -drop index un_profile_name; \ No newline at end of file +-- Copyright © 2019 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 . + +drop index un_profile_name; diff --git a/app/src/main/res/raw/sql_13.sql b/app/src/main/res/raw/sql_13.sql index e8038e9e..9b08d717 100644 --- a/app/src/main/res/raw/sql_13.sql +++ b/app/src/main/res/raw/sql_13.sql @@ -1,3 +1,18 @@ +-- Copyright © 2019 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 . + delete from options where name='transaction_list_last_update'; delete from options where name='last_refresh'; alter table options add profile varchar; @@ -19,4 +34,4 @@ create table transactions(id integer not null, data_hash varchar not null, date create unique index un_transactions_id on transactions(id); create unique index un_transactions_data_hash on transactions(data_hash); -- -create table transaction_accounts(profile varchar not null, transaction_id integer not null, account_name varchar not null, currency varchar not null default '', amount decimal not null, constraint fk_transaction_accounts_acc foreign key(profile,account_name) references accounts(profile,account_name), constraint fk_transaction_accounts_trn foreign key(transaction_id) references transactions(id)); \ No newline at end of file +create table transaction_accounts(profile varchar not null, transaction_id integer not null, account_name varchar not null, currency varchar not null default '', amount decimal not null, constraint fk_transaction_accounts_acc foreign key(profile,account_name) references accounts(profile,account_name), constraint fk_transaction_accounts_trn foreign key(transaction_id) references transactions(id)); diff --git a/app/src/main/res/raw/sql_14.sql b/app/src/main/res/raw/sql_14.sql index ddc634e6..4f5ec4c8 100644 --- a/app/src/main/res/raw/sql_14.sql +++ b/app/src/main/res/raw/sql_14.sql @@ -1,3 +1,18 @@ +-- Copyright © 2019 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 . + drop table transaction_accounts; drop table transactions; -- @@ -5,4 +20,4 @@ create table transactions(profile varchar not null, id integer not null, data_ha create unique index un_transactions_id on transactions(profile,id); create unique index un_transactions_data_hash on transactions(profile,data_hash); -- -create table transaction_accounts(profile varchar not null, transaction_id integer not null, account_name varchar not null, currency varchar not null default '', amount decimal not null, constraint fk_transaction_accounts_acc foreign key(profile,account_name) references accounts(profile,account_name), constraint fk_transaction_accounts_trn foreign key(profile, transaction_id) references transactions(profile,id)); \ No newline at end of file +create table transaction_accounts(profile varchar not null, transaction_id integer not null, account_name varchar not null, currency varchar not null default '', amount decimal not null, constraint fk_transaction_accounts_acc foreign key(profile,account_name) references accounts(profile,account_name), constraint fk_transaction_accounts_trn foreign key(profile, transaction_id) references transactions(profile,id)); diff --git a/app/src/main/res/raw/sql_15.sql b/app/src/main/res/raw/sql_15.sql index 56eb75e2..8ce967c5 100644 --- a/app/src/main/res/raw/sql_15.sql +++ b/app/src/main/res/raw/sql_15.sql @@ -1,3 +1,18 @@ +-- Copyright © 2019 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 . + delete from options where profile is null and name='last_scrape'; create table new_options(profile varchar not null, name varchar not null, value varchar); @@ -7,4 +22,4 @@ drop table options; create table options(profile varchar not null, name varchar not null, value varchar); create unique index un_options on options(profile,name); insert into options(profile,name,value) select profile,name,value from new_options; -drop table new_options; \ No newline at end of file +drop table new_options; diff --git a/app/src/main/res/raw/sql_16.sql b/app/src/main/res/raw/sql_16.sql index 235f6559..0c71dd88 100644 --- a/app/src/main/res/raw/sql_16.sql +++ b/app/src/main/res/raw/sql_16.sql @@ -1 +1,17 @@ -alter table profiles add order_no integer; \ No newline at end of file +-- Copyright © 2019 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 . + + +alter table profiles add order_no integer; diff --git a/app/src/main/res/raw/sql_17.sql b/app/src/main/res/raw/sql_17.sql index f6f7eebe..cfe1bb22 100644 --- a/app/src/main/res/raw/sql_17.sql +++ b/app/src/main/res/raw/sql_17.sql @@ -1,2 +1,17 @@ +-- Copyright © 2019 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 . + alter table profiles add permit_posting boolean default 0; -update profiles set permit_posting = 1; \ No newline at end of file +update profiles set permit_posting = 1; diff --git a/app/src/main/res/raw/sql_18.sql b/app/src/main/res/raw/sql_18.sql index bea40aa9..e74471ea 100644 --- a/app/src/main/res/raw/sql_18.sql +++ b/app/src/main/res/raw/sql_18.sql @@ -1,2 +1,17 @@ +-- Copyright © 2019 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 . + alter table profiles add theme integer default -1; -update profiles set theme = -1; \ No newline at end of file +update profiles set theme = -1; diff --git a/app/src/main/res/raw/sql_19.sql b/app/src/main/res/raw/sql_19.sql index c2bdbaf7..7221d57f 100644 --- a/app/src/main/res/raw/sql_19.sql +++ b/app/src/main/res/raw/sql_19.sql @@ -1,2 +1,17 @@ +-- Copyright © 2019 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 . + alter table accounts add expanded default 1; -update accounts set expanded = 1; \ No newline at end of file +update accounts set expanded = 1; diff --git a/app/src/main/res/raw/sql_2.sql b/app/src/main/res/raw/sql_2.sql index bd27382f..e7f8041c 100644 --- a/app/src/main/res/raw/sql_2.sql +++ b/app/src/main/res/raw/sql_2.sql @@ -1 +1,16 @@ -create table description_history(description varchar not null primary key, keep boolean); \ No newline at end of file +-- Copyright © 2018 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 . + +create table description_history(description varchar not null primary key, keep boolean); diff --git a/app/src/main/res/raw/sql_20.sql b/app/src/main/res/raw/sql_20.sql index 04855202..8e2c1eca 100644 --- a/app/src/main/res/raw/sql_20.sql +++ b/app/src/main/res/raw/sql_20.sql @@ -1,4 +1,19 @@ +-- Copyright © 2019 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 . + delete from accounts where not exists (select 1 from profiles where uuid = profile); delete from account_values where not exists (select 1 from profiles where uuid = profile); delete from transactions where not exists (select 1 from profiles where uuid = profile); -delete from transaction_accounts where not exists (select 1 from profiles where uuid = profile); \ No newline at end of file +delete from transaction_accounts where not exists (select 1 from profiles where uuid = profile); diff --git a/app/src/main/res/raw/sql_21.sql b/app/src/main/res/raw/sql_21.sql index 19d37d8a..70602319 100644 --- a/app/src/main/res/raw/sql_21.sql +++ b/app/src/main/res/raw/sql_21.sql @@ -1 +1,16 @@ -alter table accounts add amounts_expanded boolean default 0; \ No newline at end of file +-- Copyright © 2019 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 . + +alter table accounts add amounts_expanded boolean default 0; diff --git a/app/src/main/res/raw/sql_22.sql b/app/src/main/res/raw/sql_22.sql index 552397cc..7b32f531 100644 --- a/app/src/main/res/raw/sql_22.sql +++ b/app/src/main/res/raw/sql_22.sql @@ -1 +1,16 @@ -alter table profiles add preferred_accounts_filter varchar; \ No newline at end of file +-- Copyright © 2019 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 . + +alter table profiles add preferred_accounts_filter varchar; diff --git a/app/src/main/res/raw/sql_23.sql b/app/src/main/res/raw/sql_23.sql index ff3b8f71..5ceef0d5 100644 --- a/app/src/main/res/raw/sql_23.sql +++ b/app/src/main/res/raw/sql_23.sql @@ -1 +1,16 @@ -alter table profiles add future_dates integer; \ No newline at end of file +-- Copyright © 2019 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 . + +alter table profiles add future_dates integer; diff --git a/app/src/main/res/raw/sql_24.sql b/app/src/main/res/raw/sql_24.sql index 84ed1aef..2ee78172 100644 --- a/app/src/main/res/raw/sql_24.sql +++ b/app/src/main/res/raw/sql_24.sql @@ -1 +1,16 @@ -alter table profiles add api_version integer; \ No newline at end of file +-- Copyright © 2019 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 . + +alter table profiles add api_version integer; diff --git a/app/src/main/res/raw/sql_25.sql b/app/src/main/res/raw/sql_25.sql index d797a369..ae9bb47f 100644 --- a/app/src/main/res/raw/sql_25.sql +++ b/app/src/main/res/raw/sql_25.sql @@ -1 +1,16 @@ -create table currencies(id integer not null primary key, name varchar not null, position varchar not null, has_gap boolean not null); \ No newline at end of file +-- Copyright © 2020 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 . + +create table currencies(id integer not null primary key, name varchar not null, position varchar not null, has_gap boolean not null); diff --git a/app/src/main/res/raw/sql_26.sql b/app/src/main/res/raw/sql_26.sql index 5ef11025..76749836 100644 --- a/app/src/main/res/raw/sql_26.sql +++ b/app/src/main/res/raw/sql_26.sql @@ -1 +1,16 @@ -alter table transaction_accounts add comment varchar; \ No newline at end of file +-- Copyright © 2020 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 . + +alter table transaction_accounts add comment varchar; diff --git a/app/src/main/res/raw/sql_27.sql b/app/src/main/res/raw/sql_27.sql index 0d1e41c1..86d993f8 100644 --- a/app/src/main/res/raw/sql_27.sql +++ b/app/src/main/res/raw/sql_27.sql @@ -1 +1,16 @@ -alter table profiles add show_commodity_by_default boolean default 0; \ No newline at end of file +-- Copyright © 2020 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 . + +alter table profiles add show_commodity_by_default boolean default 0; diff --git a/app/src/main/res/raw/sql_28.sql b/app/src/main/res/raw/sql_28.sql index fa509c1f..8ec5fb6b 100644 --- a/app/src/main/res/raw/sql_28.sql +++ b/app/src/main/res/raw/sql_28.sql @@ -1 +1,17 @@ -alter table profiles add default_commodity varchar; \ No newline at end of file +-- Copyright © 2020 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 . + + +alter table profiles add default_commodity varchar; diff --git a/app/src/main/res/raw/sql_29.sql b/app/src/main/res/raw/sql_29.sql index 0301ba35..16164b87 100644 --- a/app/src/main/res/raw/sql_29.sql +++ b/app/src/main/res/raw/sql_29.sql @@ -1 +1,15 @@ -create index idx_transaction_description on transactions(description); \ No newline at end of file +-- Copyright © 2020 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 . +create index idx_transaction_description on transactions(description); diff --git a/app/src/main/res/raw/sql_3.sql b/app/src/main/res/raw/sql_3.sql index ceb373ec..17ed3dbd 100644 --- a/app/src/main/res/raw/sql_3.sql +++ b/app/src/main/res/raw/sql_3.sql @@ -1,4 +1,19 @@ +-- Copyright © 2018 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 . + alter table description_history add description_upper varchar; update description_history set description_upper = upper(description); alter table accounts add name_upper varchar; -update accounts set name_upper = upper(name); \ No newline at end of file +update accounts set name_upper = upper(name); diff --git a/app/src/main/res/raw/sql_30.sql b/app/src/main/res/raw/sql_30.sql index c82adf84..a559673e 100644 --- a/app/src/main/res/raw/sql_30.sql +++ b/app/src/main/res/raw/sql_30.sql @@ -1 +1,15 @@ -delete from options where profile <> '-' and not exists (select 1 from profiles p where p.uuid=options.profile); \ No newline at end of file +-- Copyright © 2020 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 . +delete from options where profile <> '-' and not exists (select 1 from profiles p where p.uuid=options.profile); diff --git a/app/src/main/res/raw/sql_31.sql b/app/src/main/res/raw/sql_31.sql index 0f907e75..49b98ba4 100644 --- a/app/src/main/res/raw/sql_31.sql +++ b/app/src/main/res/raw/sql_31.sql @@ -1 +1,15 @@ -alter table profiles add show_comments_by_default boolean default 0; \ No newline at end of file +-- Copyright © 2020 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 . +alter table profiles add show_comments_by_default boolean default 0; diff --git a/app/src/main/res/raw/sql_32.sql b/app/src/main/res/raw/sql_32.sql index b8586440..fecf2ad0 100644 --- a/app/src/main/res/raw/sql_32.sql +++ b/app/src/main/res/raw/sql_32.sql @@ -1 +1,15 @@ -update profiles set show_comments_by_default = 1; \ No newline at end of file +-- Copyright © 2020 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 . +update profiles set show_comments_by_default = 1; diff --git a/app/src/main/res/raw/sql_33.sql b/app/src/main/res/raw/sql_33.sql index e6f52493..da442f8a 100644 --- a/app/src/main/res/raw/sql_33.sql +++ b/app/src/main/res/raw/sql_33.sql @@ -1 +1,15 @@ -alter table transactions add comment varchar; \ No newline at end of file +-- Copyright © 2020 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 . +alter table transactions add comment varchar; diff --git a/app/src/main/res/raw/sql_38.sql b/app/src/main/res/raw/sql_38.sql index 60c8611e..299907f9 100644 --- a/app/src/main/res/raw/sql_38.sql +++ b/app/src/main/res/raw/sql_38.sql @@ -16,4 +16,4 @@ CREATE TABLE transaction_accounts_new(profile varchar not null, transaction_id i insert into transaction_accounts_new(profile, transaction_id, account_name, currency, amount, comment, generation, order_no) select profile, transaction_id, account_name, currency, amount, comment, generation, order_no from transaction_accounts; drop table transaction_accounts; alter table transaction_accounts_new rename to transaction_accounts; -create unique index un_transaction_accounts_order on transaction_accounts(profile, transaction_id, order_no); \ No newline at end of file +create unique index un_transaction_accounts_order on transaction_accounts(profile, transaction_id, order_no); diff --git a/app/src/main/res/raw/sql_39.sql b/app/src/main/res/raw/sql_39.sql index 0312574c..92582fac 100644 --- a/app/src/main/res/raw/sql_39.sql +++ b/app/src/main/res/raw/sql_39.sql @@ -16,4 +16,4 @@ create table description_history_new(description varchar not null primary key, d insert into description_history_new(description, description_upper) select description, description_upper from description_history; drop table description_history; alter table description_history_new rename to description_history; -create unique index un_description_history on description_history(description_upper); \ No newline at end of file +create unique index un_description_history on description_history(description_upper); diff --git a/app/src/main/res/raw/sql_4.sql b/app/src/main/res/raw/sql_4.sql index d1a14d75..e2fce110 100644 --- a/app/src/main/res/raw/sql_4.sql +++ b/app/src/main/res/raw/sql_4.sql @@ -1,2 +1,17 @@ +-- Copyright © 2018 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 . + alter table accounts add hidden boolean default 0; -update accounts set hidden = 0; \ No newline at end of file +update accounts set hidden = 0; diff --git a/app/src/main/res/raw/sql_40.sql b/app/src/main/res/raw/sql_40.sql index 18a350a0..b2168179 100644 --- a/app/src/main/res/raw/sql_40.sql +++ b/app/src/main/res/raw/sql_40.sql @@ -14,4 +14,4 @@ -- along with MoLe. If not, see . pragma foreign_keys=off; delete from transaction_accounts where not exists (select 1 from accounts a where a.profile=transaction_accounts.profile and a.name=transaction_accounts.account_name); -delete from transaction_accounts where not exists (select 1 from transactions t where t.profile=transaction_accounts.profile and t.id=transaction_accounts.transaction_id); \ No newline at end of file +delete from transaction_accounts where not exists (select 1 from transactions t where t.profile=transaction_accounts.profile and t.id=transaction_accounts.transaction_id); diff --git a/app/src/main/res/raw/sql_41.sql b/app/src/main/res/raw/sql_41.sql index 5026276a..dea27a77 100644 --- a/app/src/main/res/raw/sql_41.sql +++ b/app/src/main/res/raw/sql_41.sql @@ -14,4 +14,4 @@ -- along with MoLe. If not, see . alter table profiles add detected_version_pre_1_19 boolean; alter table profiles add detected_version_major integer; -alter table profiles add detected_version_minor integer; \ No newline at end of file +alter table profiles add detected_version_minor integer; diff --git a/app/src/main/res/raw/sql_42.sql b/app/src/main/res/raw/sql_42.sql index d2e297f8..72959503 100644 --- a/app/src/main/res/raw/sql_42.sql +++ b/app/src/main/res/raw/sql_42.sql @@ -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 diff --git a/app/src/main/res/raw/sql_43.sql b/app/src/main/res/raw/sql_43.sql index 1d6f410f..60e3147b 100644 --- a/app/src/main/res/raw/sql_43.sql +++ b/app/src/main/res/raw/sql_43.sql @@ -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,4 +13,5 @@ -- You should have received a copy of the GNU General Public License -- along with MoLe. If not, see . -alter table pattern_accounts add position integer not null default 0; \ No newline at end of file + +alter table pattern_accounts add position integer not null default 0; diff --git a/app/src/main/res/raw/sql_44.sql b/app/src/main/res/raw/sql_44.sql index a73c2c51..b6d1cc08 100644 --- a/app/src/main/res/raw/sql_44.sql +++ b/app/src/main/res/raw/sql_44.sql @@ -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 @@ -17,4 +17,4 @@ alter table patterns add transaction_description_match_group short; alter table patterns add transaction_comment_match_group short; alter table patterns add date_year short; alter table patterns add date_month short; -alter table patterns add date_day short; \ No newline at end of file +alter table patterns add date_day short; diff --git a/app/src/main/res/raw/sql_45.sql b/app/src/main/res/raw/sql_45.sql index c3d09a0d..3220e4ea 100644 --- a/app/src/main/res/raw/sql_45.sql +++ b/app/src/main/res/raw/sql_45.sql @@ -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 diff --git a/app/src/main/res/raw/sql_46.sql b/app/src/main/res/raw/sql_46.sql index a16c34df..c4f04597 100644 --- a/app/src/main/res/raw/sql_46.sql +++ b/app/src/main/res/raw/sql_46.sql @@ -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 diff --git a/app/src/main/res/raw/sql_47.sql b/app/src/main/res/raw/sql_47.sql index b7893486..e754a54f 100644 --- a/app/src/main/res/raw/sql_47.sql +++ b/app/src/main/res/raw/sql_47.sql @@ -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 diff --git a/app/src/main/res/raw/sql_48.sql b/app/src/main/res/raw/sql_48.sql index 2c725c46..fe36bb4a 100644 --- a/app/src/main/res/raw/sql_48.sql +++ b/app/src/main/res/raw/sql_48.sql @@ -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 diff --git a/app/src/main/res/raw/sql_49.sql b/app/src/main/res/raw/sql_49.sql index 3d7ba497..2852a8b8 100644 --- a/app/src/main/res/raw/sql_49.sql +++ b/app/src/main/res/raw/sql_49.sql @@ -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 diff --git a/app/src/main/res/raw/sql_5.sql b/app/src/main/res/raw/sql_5.sql index 309f82ef..84db5529 100644 --- a/app/src/main/res/raw/sql_5.sql +++ b/app/src/main/res/raw/sql_5.sql @@ -1,2 +1,17 @@ +-- Copyright © 2018 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 . + alter table accounts add level integer; -alter table accounts add parent varchar; \ No newline at end of file +alter table accounts add parent varchar; diff --git a/app/src/main/res/raw/sql_50.sql b/app/src/main/res/raw/sql_50.sql index 3f32e650..33395f2f 100644 --- a/app/src/main/res/raw/sql_50.sql +++ b/app/src/main/res/raw/sql_50.sql @@ -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,4 +13,5 @@ -- You should have received a copy of the GNU General Public License -- along with MoLe. If not, see . -alter table patterns add test_text text; \ No newline at end of file + +alter table patterns add test_text text; diff --git a/app/src/main/res/raw/sql_51.sql b/app/src/main/res/raw/sql_51.sql index c686ed84..1e84c56b 100644 --- a/app/src/main/res/raw/sql_51.sql +++ b/app/src/main/res/raw/sql_51.sql @@ -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 @@ -21,4 +21,4 @@ insert into patterns_new(id, name, regular_expression, transaction_description, drop table patterns; alter table patterns_new rename to patterns; -create unique index un_patterns_id on patterns(id); \ No newline at end of file +create unique index un_patterns_id on patterns(id); diff --git a/app/src/main/res/raw/sql_52.sql b/app/src/main/res/raw/sql_52.sql index 69fb8035..86e3cb2f 100644 --- a/app/src/main/res/raw/sql_52.sql +++ b/app/src/main/res/raw/sql_52.sql @@ -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 @@ -14,4 +14,4 @@ -- along with MoLe. If not, see . create index if not exists fk_pattern_accounts_pattern on pattern_accounts(pattern_id); -create index if not exists fk_pattern_accounts_currency on pattern_accounts(currency); \ No newline at end of file +create index if not exists fk_pattern_accounts_currency on pattern_accounts(currency); diff --git a/app/src/main/res/raw/sql_53.sql b/app/src/main/res/raw/sql_53.sql index c6d0bd12..572156d3 100644 --- a/app/src/main/res/raw/sql_53.sql +++ b/app/src/main/res/raw/sql_53.sql @@ -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,4 +13,5 @@ -- You should have received a copy of the GNU General Public License -- along with MoLe. If not, see . -alter table pattern_accounts add negate_amount INTEGER; \ No newline at end of file + +alter table pattern_accounts add negate_amount INTEGER; diff --git a/app/src/main/res/raw/sql_54.sql b/app/src/main/res/raw/sql_54.sql index 50991462..df6b44fc 100644 --- a/app/src/main/res/raw/sql_54.sql +++ b/app/src/main/res/raw/sql_54.sql @@ -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 @@ -22,4 +22,4 @@ insert into template_accounts(id, template_id, acc, position, acc_match_group, c create index fk_template_accounts_template on template_accounts(template_id); create index fk_template_accounts_currency on template_accounts(currency); drop table pattern_accounts; -drop table patterns; \ No newline at end of file +drop table patterns; diff --git a/app/src/main/res/raw/sql_55.sql b/app/src/main/res/raw/sql_55.sql index 9ae20151..fb77862a 100644 --- a/app/src/main/res/raw/sql_55.sql +++ b/app/src/main/res/raw/sql_55.sql @@ -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 diff --git a/app/src/main/res/raw/sql_6.sql b/app/src/main/res/raw/sql_6.sql index c8e86348..4d2a54cd 100644 --- a/app/src/main/res/raw/sql_6.sql +++ b/app/src/main/res/raw/sql_6.sql @@ -1,3 +1,18 @@ +-- Copyright © 2018 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 . + drop index idx_accounts_name; create table accounts_tmp(name varchar not null, name_upper varchar not null primary key, hidden boolean not null default 0, level integer not null default 0, parent_name varchar); insert or replace into accounts_tmp(name, name_upper, hidden, level, parent_name) select name, name_upper, hidden, level, parent from accounts; diff --git a/app/src/main/res/raw/sql_7.sql b/app/src/main/res/raw/sql_7.sql index 5217e5dd..780e4d4d 100644 --- a/app/src/main/res/raw/sql_7.sql +++ b/app/src/main/res/raw/sql_7.sql @@ -1,2 +1,17 @@ +-- Copyright © 2018 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 . + create table transactions(id varchar primary key, date varchar, description varchar); -create table transaction_accounts(transaction_id integer not null, account_name varchar not null, amount float, currency varchar, foreign key (transaction_id) references transactions(id), foreign key(account_name) references accounts(name)); \ No newline at end of file +create table transaction_accounts(transaction_id integer not null, account_name varchar not null, amount float, currency varchar, foreign key (transaction_id) references transactions(id), foreign key(account_name) references accounts(name)); diff --git a/app/src/main/res/raw/sql_8.sql b/app/src/main/res/raw/sql_8.sql index 0f065390..b4a85e52 100644 --- a/app/src/main/res/raw/sql_8.sql +++ b/app/src/main/res/raw/sql_8.sql @@ -1,2 +1,17 @@ +-- Copyright © 2018 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 . + alter table transactions add data_hash varchar; -delete from transactions; \ No newline at end of file +delete from transactions; diff --git a/app/src/main/res/raw/sql_9.sql b/app/src/main/res/raw/sql_9.sql index 936cec67..16a78a83 100644 --- a/app/src/main/res/raw/sql_9.sql +++ b/app/src/main/res/raw/sql_9.sql @@ -1,3 +1,18 @@ +-- Copyright © 2018 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 . + alter table transactions add keep boolean default 1 not null; update transactions set keep = 1; create table transactions_new(id integer, date varchar, description varchar, data_hash varchar, keep boolean); @@ -6,4 +21,4 @@ drop table transactions; create table transactions(id integer primary key, date varchar, description varchar, data_hash varchar, keep boolean); create unique index un_transactions_data_hash on transactions(data_hash); insert into transactions(id, date, description, data_hash, keep) select id, date, description, data_hash, keep from transactions_new; -drop table transactions_new; \ No newline at end of file +drop table transactions_new; -- 2.39.5