The invoice table
A startup stored invoices as inv(id text, amount float8, created timestamp, status text, customer text) with duplicate rows and no keys. Make id the primary key, amount numeric(12,2) (rounded), created timestamptz (the old values are UTC), status one of open|paid|void, customer required, keep all distinct invoices. Seven hidden checks.
task
Migrate the table so all hidden checks pass without losing data.