GenStackTools
Database Architecture & DDL

SQL Schema & Table DDL Generator

Visually design database tables and generate production-ready DDL scripts for PostgreSQL, MySQL, and SQLite with indexes and constraints.

Advertisement
Sponsored Space
Engine:

Columns Definition

Advertisement
Sponsored Space
users.sql (sql)
-- Table definition for users (POSTGRES)
CREATE TABLE IF NOT EXISTS users (
    id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    email VARCHAR(255) NOT NULL UNIQUE,
    full_name VARCHAR(100),
    is_active BOOLEAN NOT NULL DEFAULT TRUE,
    created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL
);

-- Indexes
CREATE UNIQUE INDEX IF NOT EXISTS idx_users_email ON users (email);