@@ -9,16 +9,16 @@ mpt-tool is a command-line utility to scaffold, run, and audit migrations for MP
99 ```
10102. ** Initialize the migration tool:**
1111 ` ` ` bash
12- mpt-tool migrate --init
12+ mpt-service-cli migrate --init
1313 ` ` `
14143. ** Create your first migration:**
1515 ` ` ` bash
16- mpt-tool migrate --new-data sync_users
16+ mpt-service-cli migrate --new-data sync_users
1717 ` ` `
18184. ** Edit the generated file in the migrations/ folder**
19195. ** Run all pending data migrations**
2020 ` ` ` bash
21- mpt-tool migrate --data
21+ mpt-service-cli migrate --data
2222 ` ` `
2323
2424# # Installation
@@ -89,7 +89,7 @@ Your Airtable table must have the following columns:
8989Before using the migration tool for the first time, you should initialize it. This creates the necessary resources:
9090
9191` ` ` bash
92- mpt-tool migrate --init
92+ mpt-service-cli migrate --init
9393` ` `
9494
9595This command creates:
@@ -114,11 +114,11 @@ This command creates:
1141142. Run the appropriate command:
115115```bash
116116 # Data migration
117- mpt-tool migrate --new-data "migration_name"
117+ mpt-service-cli migrate --new-data "migration_name"
118118```
119119```bash
120120 # Schema migration
121- mpt-tool migrate --new-schema "migration_name"
121+ mpt-service-cli migrate --new-schema "migration_name"
122122```
123123
124124A new file is created in `migrations/` with a timestamped prefix (e.g., `20260113180013_migration_name.py`) and a prefilled `Command` class.
@@ -164,7 +164,7 @@ class Migration(DataBaseMigration, MPTAPIClientMixin, AirtableAPIClientMixin):
164164Before running migrations, you can validate your migration folder for issues:
165165
166166```bash
167- mpt-tool migrate --check
167+ mpt-service-cli migrate --check
168168```
169169
170170This command:
@@ -185,11 +185,11 @@ Error running check command: Duplicate migration_id found in migrations: 2026011
185185### Running Migrations
186186- **Run all pending data migrations:**
187187 ```bash
188- mpt-tool migrate --data
188+ mpt-service-cli migrate --data
189189 ```
190190- **Run all pending schema migrations:**
191191 ```bash
192- mpt-tool migrate --schema
192+ mpt-service-cli migrate --schema
193193 ```
194194
195195Migrations are executed in order based on their order_id (timestamp). The tool automatically:
@@ -241,7 +241,7 @@ If a migration fails during execution:
241241To mark a migration as applied without running it:
242242
243243```bash
244- mpt-tool migrate --fake MIGRATION_ID
244+ mpt-service-cli migrate --fake MIGRATION_ID
245245```
246246
247247Where `MIGRATION_ID` is the filename without `order_id` and `.py` (e.g., `test1`).
@@ -262,7 +262,7 @@ If the migration exists:
262262To see all migrations and their status:
263263
264264```bash
265- mpt-tool migrate --list
265+ mpt-service-cli migrate --list
266266```
267267
268268The output shows execution order, status, and timestamps.
@@ -278,17 +278,17 @@ The status column is derived from the persisted timestamps:
278278| not applied | No state entry exists for the migration file |
279279
280280### Getting Help
281- Run `mpt-tool --help` to see all available commands and params:
281+ Run `mpt-service-cli --help` to see all available commands and params:
282282```bash
283- mpt-tool --help
284- mpt-tool migrate --help
283+ mpt-service-cli --help
284+ mpt-service-cli migrate --help
285285```
286286
287287
288288## Best Practices
289289
290290### Migration Validation
291- - Run `mpt-tool migrate --check` before committing migration files
291+ - Run `mpt-service-cli migrate --check` before committing migration files
292292- Include `--check` in your CI/CD pipeline to catch issues early
293293- Verify there are no duplicate migration_id values before deployment
294294
0 commit comments