wip
This commit is contained in:
1 parent
b0a002c7c1
commit
23cf804865
23 files changed
+283
-123
No files matched your search
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('personal_notifications', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('user_id')->index()->references('id')->on('users');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('alarm_level_id')->default(0);
|
||||
$table->boolean('notify_by_system')->default(false);
|
||||
$table->boolean('notify_by_email')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('personal_notifications');
|
||||
}
|
||||
};
|
||||
+3
-7
@@ -11,16 +11,12 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('event_user_notifications', function (Blueprint $table) {
|
||||
Schema::create('personal_notification_sends', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('bookmaker_id')->default(0);
|
||||
$table->integer('user_id')->index()->references('id')->on('users');
|
||||
$table->integer('odds_table_id')->index()->references('id')->on('odds_tables');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('alarm_level_id')->default(0);
|
||||
$table->boolean('notify_by_email')->default(false);
|
||||
$table->boolean('deleted')->default(false);
|
||||
$table->boolean('is_notified')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
@@ -30,6 +26,6 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('event_user_notifications');
|
||||
Schema::dropIfExists('personal_notification_sends');
|
||||
}
|
||||
};
|
||||
@@ -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
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('alarm_levels', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('color');
|
||||
$table->decimal('default_threshold', 3, 2)->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('alarm_levels');
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user