DB Sketcher CLI Lexer Terminal
ITools Database Sketcher v1.0 Lexer Ready.
Type help or click Reference for syntax rules & short codes.
>
100%
Edit Column
Generated ANSI SQL DDL Script
DB Sketcher Reference & Short Codes
CLI Command Syntax Reference
| Command Pattern | Description & Example |
|---|---|
add c <name> @<template> | Add column using template (e.g. add c description @desc) |
add c <name> [t:..] [c:..] [d:..] [r:..] [mods] | Add column directly (e.g. add c description t:text c:utf8 d:"default text" NN) |
ch c <colName> [opts] | Change column attributes (e.g. ch c title -NN or ch c title t:v90) |
ren c <col1> <col2> / ren t <t1> <t2> | Rename column or table |
add i COL1 [COL2] | Add non-unique index on active table (autogenerated idx_col1_col2) |
add u COL1 [COL2] | Add unique index on active table (autogenerated idx_col1_col2) |
del i <indexName> / del u <indexName> | Delete index or unique index from active table |
add fk [COL1 TAB2.COL2] [MOD] | Add foreign key (MOD: DEL=Cascade, NULL=Set Null, REJECT=Restrict, default NONE). Omitting params auto-adds FKs matching referAs! |
del fk <fkName> | Delete foreign key from active table |
del c <colName> / del t <tableName> | Delete column or table |
use <tableName> | Switch active table context |
Data Type Short Codes (t:)
| Short Code | Expanded SQL Type | Description & Example |
|---|---|---|
vXX | VARCHAR(XX) | Variable length string (e.g. v80 → VARCHAR(80), v255 → VARCHAR(255)) |
cXX | CHAR(XX) | Fixed length string (e.g. c20 → CHAR(20), c5 → CHAR(5)) |
int | INT | Standard 32-bit integer |
bi | BIGINT | 64-bit big integer |
txt | TEXT | Text block |
mtxt | MEDIUMTEXT | Medium text block |
ltxt | LONGTEXT | Long text block |
ts | TIMESTAMP | Timestamp column |
dt | DATETIME | Date & time column |
bool | TINYINT(1) | Boolean flag |
dec(P,S) | DECIMAL(P,S) | Fixed precision decimal (e.g. dec(10,2) → DECIMAL(10,2)) |
Collation Short Codes (c:)
| Short Code Pattern | Expanded Collation | Example & Description |
|---|---|---|
ascii | ascii_general_ci | Standard 7-bit ASCII collation |
ascii_ci | ascii_bin | Binary case-insensitive ASCII |
utf8 | utf8mb4_general_ci | Default UTF-8 4-byte collation |
utf8_ci | utf8mb4_unicode_ci | Unicode UTF-8 case-insensitive |
utf8[country] | utf8mb4_[country]_ci | Country specific collation (e.g. utf8hun → utf8mb4_hungarian_ci) |
utf8[country]_ci | utf8mb4_[country]_ci | Country specific CI collation (e.g. utf8hun_ci → utf8mb4_hungarian_ci) |