Fix migrations
continuous-integration/drone/push Build is failing Details

This commit is contained in:
philipp lang 2024-07-14 19:57:37 +02:00
parent c3f6d3827b
commit 757042bdd2
1 changed files with 7 additions and 6 deletions

View File

@ -14,9 +14,9 @@ return new class extends Migration
public function up()
{
Schema::table('forms', function (Blueprint $table) {
$table->json('description')->after('name')->default(json_encode(['time' => 4, 'blocks' => [], 'version' => '1.0']))->change();
$table->json('mail_top')->after('name')->default(json_encode(['time' => 4, 'blocks' => [], 'version' => '1.0']))->change();
$table->json('mail_bottom')->after('name')->default(json_encode(['time' => 4, 'blocks' => [], 'version' => '1.0']))->change();
$table->json('description')->default(json_encode(['time' => 4, 'blocks' => [], 'version' => '1.0']))->change();
$table->json('mail_top')->default(json_encode(['time' => 4, 'blocks' => [], 'version' => '1.0']))->nullable(false)->change();
$table->json('mail_bottom')->default(json_encode(['time' => 4, 'blocks' => [], 'version' => '1.0']))->nullable(false)->change();
});
}
@ -27,9 +27,10 @@ return new class extends Migration
*/
public function down()
{
Schema::table('formtemplates', function (Blueprint $table) {
$table->dropColumn('mail_top');
$table->dropColumn('mail_bottom');
Schema::table('forms', function (Blueprint $table) {
$table->json('description')->default(null)->change();
$table->json('mail_top')->default(null)->nullable(true)->change();
$table->json('mail_bottom')->default(null)->nullable(true)->change();
});
}
};