Skip to content

Commit 83845a6

Browse files
committed
Update migration
1 parent 5e997d2 commit 83845a6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

backend/database/migrations/2024_12_09_234323_add_notes_to_attendees_table.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@
88
public function up(): void
99
{
1010
Schema::table('attendees', static function (Blueprint $table) {
11+
if (Schema::hasColumn('attendees', 'notes')) {
12+
return;
13+
}
1114
$table->text('notes')->nullable();
1215
});
1316
}
1417

1518
public function down(): void
1619
{
1720
Schema::table('attendees', static function (Blueprint $table) {
21+
if (!Schema::hasColumn('attendees', 'notes')) {
22+
return;
23+
}
1824
$table->dropColumn('notes');
1925
});
2026
}

0 commit comments

Comments
 (0)