CREATE table IF NOT EXISTS accounts(
id SERIAL PRIMARY KEY,
accountnum VARCHAR UNIQUE NOT NULL,
accountname VARCHAR UNIQUE NOT NULL,
orgid int -- this needs to be a foregn key on organizations
);

CREATE TABLE IF NOT EXISTS organizations(
id SERIAL PRIMARY KEY,
orgname VARCHAR(50) UNIQUE NOT NULL
)

CREATE TABLE IF NOT EXISTS transactions(
id SERIAL PRIMARY KEY,
datetime DATE NOT NULL,
amount REAL NOT NULL,
accountid INT NOT NULL --foreign key from accounts
orgid INT NOT NULL --foreign key from organizations
)