SQL Server, PostgreSQL, and MySQL — platform-specific conventions, naming rules, and connection setup.
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 |
Each platform uses its own set of naming prefixes for database objects. Ask Forge applies these automatically when generating SQL.
| Object | Prefix |
|---|---|
| Table | (none) |
| View | vw_ |
| Stored Procedure | usp_ |
| Function | fn_ |
| Index | IX_ |
| Foreign Key | FK_ |
| Primary Key | PK_ |
| Unique Constraint | UQ_ |
| Check Constraint | CK_ |
| Default Constraint | DF_ |
| Object | Prefix |
|---|---|
| Table | (none) |
| View | v_ |
| Stored Procedure | (none) |
| Function | fn_ |
| Index | ix_ |
| Foreign Key | fk_ |
| Primary Key | pk_ |
| Unique Constraint | uq_ |
| Check Constraint | ck_ |
| Default Constraint | df_ |
| Object | Prefix |
|---|---|
| Table | (none) |
| View | vw_ |
| Stored Procedure | usp_ |
| Function | fn_ |
| Index | IX_ |
| Foreign Key | FK_ |
| Primary Key | PK_ |
| Unique Constraint | UQ_ |
| Check Constraint | CK_ |
| Default Constraint | DF_ |
lower_case_table_names=0), making schemas non-portable across operating systems.
Ask Forge determines the active platform using this precedence order:
--platform flag — Explicit parameter on a CLI command (mssql, postgresql, mysql)Product.json when you load a SchemaSmith product directory~/.forge/session.json on startupMSSQL if nothing else is setTo 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
Configure database connections using the set-connection command. Each platform has its own default port and connection parameters.
ask-forge set-connection --platform mssql --server localhost --port 1433 \
--database MyDB --user sa --password "..."
ask-forge set-connection --platform postgresql --server localhost --port 5432 \
--database mydb --user postgres --password "..."
ask-forge set-connection --platform mysql --server localhost --port 3306 \
--database mydb --user root --password "..."