feat(event): add rescheduling and cancellation state to event dates
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('event_dates', function (Blueprint $table): void {
|
||||
$table->foreignId('rescheduled_to_event_date_id')
|
||||
->nullable()
|
||||
->after('validity_time_id')
|
||||
->constrained('event_dates')
|
||||
->restrictOnDelete();
|
||||
$table->dateTime('cancelled_at')
|
||||
->nullable()
|
||||
->after('rescheduled_to_event_date_id');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('event_dates', function (Blueprint $table): void {
|
||||
$table->dropConstrainedForeignId('rescheduled_to_event_date_id');
|
||||
$table->dropColumn('cancelled_at');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user