smart_ide/services/docv/docv-back/migrations/20260330120000_create_users.sql
Nicolas Cantu 01860b7af7 chore: remove gitmodules, add docv workspace crates, update systemd README
- Drop .gitmodules (ia_dev tracked as submodule pointer without file)
- Add services/docv Cargo workspace: docv-back, docv-shared, migrations, sources
- Refresh systemd/README.md
2026-04-03 17:55:50 +02:00

15 lines
440 B
SQL

-- Minimal users table for docv authentication (zone 1, IMPL_01).
-- Compatible with PostgreSQL 13+ (gen_random_uuid).
CREATE TABLE IF NOT EXISTS users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email TEXT NOT NULL UNIQUE,
password_hash TEXT NOT NULL,
name TEXT,
phone TEXT,
preferences JSONB,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_users_email ON users (email);