Added indices on bankId and accountId (not senseful in all cases (currently) )

This commit is contained in:
dankito 2024-09-17 00:20:22 +02:00
parent e883713eba
commit 34f2fca126
2 changed files with 21 additions and 0 deletions

View File

@ -53,6 +53,12 @@ CREATE TABLE IF NOT EXISTS AccountTransaction (
isReversal INTEGER AS Boolean NOT NULL
);
CREATE INDEX idx_AccountTransaction_bankId
ON AccountTransaction (bankId);
CREATE INDEX idx_AccountTransaction_accountId
ON AccountTransaction (accountId);
insertTransaction:
INSERT INTO AccountTransaction(
@ -163,6 +169,12 @@ CREATE TABLE IF NOT EXISTS Holding (
buyingDate TEXT
);
CREATE INDEX idx_Holding_bankId
ON Holding (bankId);
CREATE INDEX idx_Holding_accountId
ON Holding (accountId);
insertHolding:
INSERT INTO Holding(

View File

@ -111,6 +111,9 @@ CREATE TABLE IF NOT EXISTS BankAccount (
includeInAutomaticAccountsUpdate INTEGER AS Boolean NOT NULL
);
CREATE INDEX idx_BankAccount_bankId
ON BankAccount (bankId);
insertBankAccount:
INSERT INTO BankAccount(
@ -165,6 +168,9 @@ CREATE TABLE IF NOT EXISTS TanMethod (
allowedTanFormat TEXT NOT NULL
);
CREATE INDEX idx_TanMethod_bankId
ON TanMethod (bankId);
insertTanMethod:
INSERT INTO TanMethod(
@ -214,6 +220,9 @@ CREATE TABLE IF NOT EXISTS TanMedium (
validTo TEXT
);
CREATE INDEX idx_TanMedium_bankId
ON TanMedium (bankId);
insertTanMedium:
INSERT INTO TanMedium(