Guides¶
Each guide covers one task. Commands lists every option. Supported objects lists every object kind.
Writing the schema¶
- Working with multiple schemas: targeting a schema other than
public, files without schema names, mapping names. - Renaming objects: a rename instead of a drop and a create.
- Running arbitrary SQL: statements that pistachio does not manage, run before or after the DDL.
Running plan and apply¶
- Controlling drops: which drops require
--allow-drop. - Filtering what is managed: by name, by object type, one object, partitions.
- Transactions and locks:
--with-tx, index builds that do not block writes, lock timeouts. - Explaining a plan: what each statement scans or rewrites, and what it blocks.
- Plan files: plan on one machine, apply on another.
- Preventing concurrent applies: one apply at a time per database.
Without a database¶
- Diffing schema files: the DDL between two files or two git revisions.
- Formatting schema files:
pista fmt. - Parsing schema files: the schema as JSON.