Implements a new `/core:migrate` command to provide a set of helpers for working with Laravel migrations in a monorepo environment. The new command includes the following subcommands: - `/core:migrate create <name>`: Creates a new migration file. - `/core:migrate run`: Runs all pending migrations. - `/core:migrate rollback`: Rolls back the last migration. - `/core:migrate fresh`: Drops all tables and re-runs all migrations. - `/core:migrate status`: Shows the status of all migrations. - `/core:migrate from-model <ModelName>`: Generates a new migration by analyzing an existing Laravel model. Key Features: - **Smart Migration Generation**: The `from-model` command uses a robust PHP script with Reflection to accurately parse model properties and relationships, generating a complete schema definition. - **Multi-Tenant Awareness**: New migrations automatically include a `workspace_id` foreign key to support multi-tenant architectures. - **Module Support**: The `create` and `from-model` commands accept `--path` and `--model-path` arguments, allowing them to be used with different modules in a monorepo. - **Automatic Indexing**: The `from-model` command automatically adds database indexes to foreign key columns. |
||
|---|---|---|
| .. | ||
| marketplace.json | ||