SchemaSmith Documentation

Platform Support

SQL Server, PostgreSQL, and MySQL — platform-specific conventions, naming rules, and connection setup.

Ask Forge Platform Support

Platform Comparison

Ask Forge supports three database platforms. Each platform has its own provider that generates platform-specific SQL, applies naming conventions, and handles platform capabilities.

Feature SQL Server PostgreSQL MySQL
Platform ID MSSQL PostgreSQL MySQL
Default Schema dbo public None (database-level)
Max Identifier Length 128 63 64
Identifier Wrapping [Name] "name" (auto-lowercased) `Name`
Naming Convention PascalCase snake_case (lowercase preferred) PascalCase
Identity Syntax IDENTITY(1,1) GENERATED ALWAYS AS IDENTITY AUTO_INCREMENT
Schemas
Temporal Tables
Enum Types
Domain Types
Array Types
JSON Columns
Computed Columns
Partitioning
Full-Text Search
XML Indexes

Naming Conventions

Each platform uses its own set of naming prefixes for database objects. Ask Forge applies these automatically when generating SQL.

SQL Server (MSSQL) — PascalCase
Object Prefix
Table(none)
Viewvw_
Stored Procedureusp_
Functionfn_
IndexIX_
Foreign KeyFK_
Primary KeyPK_
Unique ConstraintUQ_
Check ConstraintCK_
Default ConstraintDF_
PostgreSQL — snake_case (lowercase)
Object Prefix
Table(none)
Viewv_
Stored Procedure(none)
Functionfn_
Indexix_
Foreign Keyfk_
Primary Keypk_
Unique Constraintuq_
Check Constraintck_
Default Constraintdf_
Ask Forge will warn you if a table name contains uppercase characters. PostgreSQL requires double-quoting to reference identifiers that are not all-lowercase. Prefer snake_case naming to avoid this issue.
MySQL — PascalCase
Object Prefix
Table(none)
Viewvw_
Stored Procedureusp_
Functionfn_
IndexIX_
Foreign KeyFK_
Primary KeyPK_
Unique ConstraintUQ_
Check ConstraintCK_
Default ConstraintDF_
Ask Forge will warn you if a table name uses mixed case. Mixed-case identifiers can cause issues on case-sensitive file systems (Linux with lower_case_table_names=0), making schemas non-portable across operating systems.

Platform Detection

Ask Forge determines the active platform using this precedence order:

  1. --platform flag — Explicit parameter on a CLI command (mssql, postgresql, mysql)
  2. Product context — Auto-detected from Product.json when you load a SchemaSmith product directory
  3. Previous session — Restored from ~/.forge/session.json on startup
  4. Default — Falls back to MSSQL if nothing else is set

To inspect a specific platform's features, naming rules, and identifier limits:

ask-forge show-platform-capabilities --platform postgresql

You can also set the FORGE_PLATFORM environment variable to override the default platform for all commands:

set FORGE_PLATFORM=PostgreSQL
export FORGE_PLATFORM=PostgreSQL

Connection Setup

Configure database connections using the set-connection command. Each platform has its own default port and connection parameters.

SQL Server

ask-forge set-connection --platform mssql --server localhost --port 1433 \
  --database MyDB --user sa --password "..."

PostgreSQL

ask-forge set-connection --platform postgresql --server localhost --port 5432 \
  --database mydb --user postgres --password "..."

MySQL

ask-forge set-connection --platform mysql --server localhost --port 3306 \
  --database mydb --user root --password "..."
See Configuration for the full connection reference, including environment variable substitution for passwords.