Framework updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -376,6 +376,11 @@
|
||||
"created_at": "2025-12-27T22:53:05+00:00",
|
||||
"created_by": "root",
|
||||
"command": "php artisan make:migration:safe convert_tasks_polymorphic_to_type_refs"
|
||||
},
|
||||
"2026_01_12_073624_add_timezone_to_sites_table.php": {
|
||||
"created_at": "2026-01-12T07:36:24+00:00",
|
||||
"created_by": "root",
|
||||
"command": "php artisan make:migration:safe add_timezone_to_sites_table"
|
||||
}
|
||||
}
|
||||
}
|
||||
23
database/migrations/2026_01_12_073624_add_timezone_to_sites_table.php
Executable file
23
database/migrations/2026_01_12_073624_add_timezone_to_sites_table.php
Executable file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* IMPORTANT: Use raw MySQL queries for clarity and auditability
|
||||
* ✅ DB::statement("ALTER TABLE sites ADD COLUMN new_field VARCHAR(255)")
|
||||
* ❌ Schema::table() with Blueprint
|
||||
*
|
||||
* Migrations must be self-contained - no Model/Service references
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
DB::statement("ALTER TABLE sites ADD COLUMN timezone VARCHAR(50) NOT NULL DEFAULT 'America/Chicago' AFTER name");
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user