-- 1526142253 UP add-checks
CREATE TABLE checks (id serial primary key,
s3_uuid varchar(255),
s3_key varchar(255),
s3_url varchar(255),
vendor_id int references vendors(id),
company_id int references companies(id),
check_number int,
memo varchar(512),
date timestamp with time zone,
amount decimal,
paid_to varchar(255),
data text);

CREATE TABLE invoices_checks (
id serial primary key,
check_id int references checks(id),
invoice_id int references invoices(id),
amount decimal
);
