SchemaSmith Documentation

Platform Support

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

By the SchemaSmith Team · Last reviewed

Ask Forge Platform Support

Ask Forge speaks SQL Server, PostgreSQL, and MySQL fluently.

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 SqlServer PostgreSQL MySQL
Default Schema dbo public None (database-level)
Max Identifier Length 128 63 64
Identifier Wrapping [Name] "name" `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 — 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 derives the active platform from the schema product you are working in — there is no global platform flag. It resolves the platform in this order:

  1. Product context — Read from the loaded Product.json when you open a product with --product, or when you run inside a product directory (Ask Forge walks up from the current folder to find it).
  2. Previous session — Restored from ~/.schemasmith/session.json on startup.
  3. Default — Falls back to SqlServer if nothing else is set.

Tools that target a specific platform accept a --platform parameter (sqlserver, postgresql, mysql). For example, to inspect a platform's features, naming rules, and identifier limits:

ask-forge show-platform-capabilities --platform postgresql
When Ask Forge runs as an MCP server, its default platform is set by the ForgeBarrett:Platforms:Default configuration key (default SqlServer).

Connection Setup

Configure database connections with the manage-connection command (action set). Each platform has its own default port and connection parameters.

SQL Server

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

PostgreSQL

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

MySQL

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