Bugfixes & Model for participants
This commit is contained in:
@@ -30,14 +30,14 @@ return new class extends Migration {
|
||||
$table->float('amount',2);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('type')->references('slug')->on('participation_types')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->foreign('tenant')->references('slug')->on('tenants')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->foreign('type')->references('slug')->on('participation_types')->restrictOnDelete()->cascadeOnUpdate();
|
||||
$table->foreign('tenant')->references('slug')->on('tenants')->restrictOnDelete()->cascadeOnUpdate();
|
||||
});
|
||||
|
||||
Schema::create('events', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('tenant');
|
||||
$table->foreignId('cost_unit_id')->nullable()->constrained('cost_units', 'id')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->foreignId('cost_unit_id')->nullable()->constrained('cost_units', 'id')->restrictOnDelete()->cascadeOnUpdate();
|
||||
|
||||
$table->string('name');
|
||||
$table->string('location');
|
||||
@@ -67,21 +67,21 @@ return new class extends Migration {
|
||||
$table->boolean('archived')->default(false);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('tenant')->references('slug')->on('tenants')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->foreign('participation_fee_type')->references('slug')->on('participation_fee_types')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->foreign('tenant')->references('slug')->on('tenants')->restrictOnDelete()->cascadeOnUpdate();
|
||||
$table->foreign('participation_fee_type')->references('slug')->on('participation_fee_types')->restrictOnDelete()->cascadeOnUpdate();
|
||||
});
|
||||
|
||||
Schema::create('event_allowed_eating_habits', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->constrained('events', 'id')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->foreignId('eating_habit_id')->constrained('eating_habits', 'id')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->foreignId('event_id')->constrained('events', 'id')->restrictOnDelete()->cascadeOnUpdate();
|
||||
$table->foreignId('eating_habit_id')->constrained('eating_habits', 'id')->restrictOnDelete()->cascadeOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('event_managers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->constrained('events', 'id')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->string('user_id')->constrained('users', 'id')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->foreignId('event_id')->constrained('events', 'id')->restrictOnDelete()->cascadeOnUpdate();
|
||||
$table->string('user_id')->constrained('users', 'id')->restrictOnDelete()->cascadeOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user