buster/api/migrations/2024-06-03-034618_create_users/up.sql

13 lines
363 B
MySQL
Raw Normal View History

2025-01-04 05:32:54 +08:00
-- Your SQL goes here
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email TEXT NOT NULL UNIQUE,
name TEXT,
config JSONB NOT NULL DEFAULT '{}',
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
-- Enable Row Level Security
ALTER TABLE
users ENABLE ROW LEVEL SECURITY;