X-Git-Url: https://git.ktnx.net/?p=mobile-ledger-staging.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fres%2Fraw%2Fcreate_db.sql;h=e640baef78ead9e2d66b029fb9b80bbdc08ae60e;hp=dc96f4bb628bb85e336b5b61198e2e45d82f6f06;hb=bc4c55c442d22e34e4da3827947c7fa9a2ab4bc1;hpb=8a7234e211e68af2e54f082606c8bb4fe5924f0c diff --git a/app/src/main/res/raw/create_db.sql b/app/src/main/res/raw/create_db.sql index dc96f4bb..e640baef 100644 --- a/app/src/main/res/raw/create_db.sql +++ b/app/src/main/res/raw/create_db.sql @@ -25,7 +25,7 @@ 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 index idx_transaction_description on transactions(description); -create table transaction_accounts(profile varchar not null, transaction_id integer not null, order_no integer not null, account_name varchar not null, currency varchar not null default '', amount decimal not null, comment varchar, constraint fk_transaction_accounts_acc foreign key(profile,account_name) references accounts(profile,name), constraint fk_transaction_accounts_trn foreign key(profile, transaction_id) references transactions(profile,id), generation integer default 0); +create table transaction_accounts(profile varchar not null, transaction_id integer not null, order_no integer not null, account_name varchar not null, currency varchar not null default '', amount decimal not null, comment varchar, generation integer default 0, constraint fk_transaction_accounts_acc foreign key(profile,account_name) references accounts(profile,name), constraint fk_transaction_accounts_trn foreign key(profile, transaction_id) references transactions(profile,id)); create unique index un_transaction_accounts_order on transaction_accounts(profile, transaction_id, order_no); create table currencies(id integer not null primary key, name varchar not null, position varchar not null, has_gap boolean not null); -- updated to revision 39 \ No newline at end of file