Files
template-vitrine/backend/migrations/000018_create_customer_verifications.up.sql
Xor290 919c807004
ci-api / test (push) Failing after 8m7s
ci-web / test (push) Failing after 5m5s
chore: build
2026-09-20 12:18:33 +02:00

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'))
);