tcb db pg migration new
Create a migration file in cloudbase/migrations/ under the project directory.
Usage
tcb db pg migration new <name>
Parameters
| Parameter | Required | Description | Default |
|---|---|---|---|
<name> | Yes | Migration name, lowercase letters and underscores only | — |
Examples
# Create an empty file
tcb db pg migration new create_users_table
# Write SQL content through stdin
echo "CREATE TABLE t(id int)" | tcb db pg migration new add_t