Merge pull request #47 from albertvisuals/main

Fix: JSON columns with default('[]') fail on MySQL 8
This commit is contained in:
Paulo Castellano 2026-05-19 12:26:05 -03:00 committed by GitHub
commit eae702e620
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ public function up(): void
$table->uuid('workspace_id');
$table->uuid('user_id')->nullable();
$table->text('content')->nullable();
$table->json('media')->default('[]');
$table->json('media')->nullable()->default(null);
$table->string('status')->default('draft');
$table->timestamp('scheduled_at')->nullable();
$table->timestamp('published_at')->nullable();

View file

@ -16,7 +16,7 @@ public function up(): void
$table->uuid('user_id')->nullable();
$table->uuid('parent_id')->nullable();
$table->text('body');
$table->json('reactions')->default('[]');
$table->json('reactions')->nullable()->default(null);
$table->timestamps();
$table->foreign('post_id')->references('id')->on('posts')->cascadeOnDelete();