drop table if exists account; create table if not exists accounts ( uuid uuid primary key default gen_random_uuid (), name text default '' ); drop table if exists transactions; create table if not exists transactions ( uuid uuid primary key default gen_random_uuid (), source uuid references accounts (uuid), target uuid references accounts (uuid), amount double precision not null );