Files

20 lines
604 B
SQL

create table "account_deletion" (
"id" uuid primary key,
"version" integer not null,
"created_at" timestamptz not null,
"updated_at" timestamptz not null,
"user_id" uuid not null,
"state" text not null,
"pending" jsonb not null,
"erased" jsonb not null,
"abandoned" jsonb not null,
"attempts" integer not null,
"last_failure" text,
"requested_at" text not null,
"completed_at" text
);
alter table "account_deletion" add constraint "account_deletion_user_id_key" unique nulls not distinct ("user_id");
create index "account_deletion_state_idx" on "account_deletion" ("state");