12 lines
467 B
SQL
12 lines
467 B
SQL
CREATE TABLE customer_verifications (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
user_id UUID NOT NULL UNIQUE REFERENCES users(id) ON DELETE CASCADE,
|
|
front_key TEXT NOT NULL,
|
|
back_key TEXT NOT NULL,
|
|
status TEXT NOT NULL DEFAULT 'pending',
|
|
admin_note TEXT NOT NULL DEFAULT '',
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
|
CHECK (status IN ('pending', 'approved', 'rejected'))
|
|
);
|