rust_forum/migrations/20241204225135_create_user_table.up.sql
Ahmet Kaan GÜMÜŞ 0bb5a0b753 feat: tracing system
fix: 🚑 user_contact is not containing value
feat:  html mail system
refactor: ♻️ axum 0.8 routing compatibility
fix: 🚑 custom claim isn't working in jwt
feat:  token header extended compatibility
2025-01-23 21:34:54 +03:00

10 lines
358 B
SQL

-- Add up migration script here
CREATE TABLE IF NOT EXISTS "user"(
user_id BIGSERIAL PRIMARY KEY NOT NULL UNIQUE,
name VARCHAR(256) NOT NULL,
surname VARCHAR(256) NOT NULL,
gender BOOLEAN NOT NULL,
birth_date DATE NOT NULL,
role_id BIGINT NOT NULL REFERENCES "role" DEFAULT 10,
creation_time TIMESTAMPTZ NOT NULL DEFAULT NOW()
);