Framework updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -42,22 +42,20 @@ Schema::create('products', function (Blueprint $table) {
|
||||
## Development Workflow
|
||||
|
||||
```bash
|
||||
# 1. Create snapshot (required)
|
||||
php artisan migrate:begin
|
||||
|
||||
# 2. Create migration
|
||||
# 1. Create migration
|
||||
php artisan make:migration:safe create_products_table
|
||||
|
||||
# 3. Write migration with raw SQL
|
||||
# 4. Run migrations
|
||||
# 2. Write migration with raw SQL
|
||||
|
||||
# 3. Run migrations (auto-snapshot in development)
|
||||
php artisan migrate
|
||||
|
||||
# 5. If successful
|
||||
php artisan migrate:commit
|
||||
|
||||
# 6. If failed - auto-rollback to snapshot
|
||||
```
|
||||
|
||||
In development mode, `migrate` automatically:
|
||||
- Creates database snapshot before running
|
||||
- Commits on success (regenerates constants, recompiles bundles)
|
||||
- Auto-rollbacks on failure (database restored to pre-migration state)
|
||||
|
||||
---
|
||||
|
||||
## Automatic Normalization
|
||||
@@ -163,14 +161,19 @@ user_id BIGINT NULL -- ✅ Matches
|
||||
|
||||
---
|
||||
|
||||
## Production Workflow
|
||||
## Debug/Production Workflow
|
||||
|
||||
```bash
|
||||
# No snapshot protection in production
|
||||
php artisan migrate --production
|
||||
# In debug or production mode (RSX_MODE=debug or production)
|
||||
php artisan migrate
|
||||
```
|
||||
|
||||
Ensure migrations are thoroughly tested in development/staging first.
|
||||
In debug/production mode:
|
||||
- No snapshot protection (source code is read-only)
|
||||
- Schema normalization still runs
|
||||
- Constants and bundles NOT regenerated
|
||||
|
||||
Ensure migrations are thoroughly tested in development first.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user