sql setup

This commit is contained in:
salam committed 2026-01-03 22:28:20 +01:00
1 parent c02e727a40
commit 2f512e0e0d
9 files changed
+13 -14

No files matched your search

@@ -24,13 +24,12 @@ return new class extends Migration
$table->integer('lognig_id')->default(0)->nullable()->index();
$table->integer('logcol_id')->default(0)->nullable()->index();
$table->dateTime('starttime')->nullable();
$table->integer('sport_id')->index();
$table->integer('sport_id')->index()->references('id')->on('sports');
$table->integer('country_id')->default(0)->nullable()->index();
$table->integer('group_id')->default(0)->nullable()->index();
$table->integer('competition_group_id')->default(0)->nullable()->index();
$table->integer('home_id')->default(0)->nullable()->index();
$table->integer('away_id')->default(0)->nullable()->index();
$table->integer('competition_group_id')->default(0)->nullable()->index()->references('id')->on('competition_groups');
$table->integer('home_id')->default(0)->nullable()->index()->references('id')->on('elements');
$table->integer('away_id')->default(0)->nullable()->index()->references('id')->on('elements');
$table->timestamps();
});
}
@@ -13,7 +13,7 @@ return new class extends Migration
{
Schema::create('event_bookmakers', function (Blueprint $table) {
$table->id();
$table->integer('event_id')->index();
$table->integer('event_id')->index()->references('id')->on('events');
$table->integer('bookmaker_id')->index();
$table->string('bmoid')->nullable();
$table->boolean('send_status')->default(0);
@@ -13,8 +13,8 @@ return new class extends Migration
{
Schema::create('element_providers', function (Blueprint $table) {
$table->id();
$table->integer('sport_id')->index();
$table->integer('element_id')->index();
$table->integer('sport_id')->index()->references('id')->on('sports');
$table->integer('element_id')->index()->references('id')->on('elements');
$table->integer('provider_id')->default(0)->nullable()->index();
$table->integer('provider_element_id')->index();
$table->string('name');
@@ -14,7 +14,7 @@ return new class extends Migration
Schema::create('competition_groups', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->integer('sport_id')->index();
$table->integer('sport_id')->index()->references('id')->on('sports');
$table->integer('country_id')->default(0)->nullable()->index();
$table->timestamps();
});
@@ -13,7 +13,7 @@ return new class extends Migration
{
Schema::create('competition_group_providers', function (Blueprint $table) {
$table->id();
$table->integer('sport_id')->index();
$table->integer('sport_id')->index()->references('id')->on('sports');
$table->integer('competition_group_id')->default(0)->nullable()->index();
$table->integer('provider_id')->default(0)->nullable()->index();
$table->integer('provider_group_id')->default(0)->nullable()->index();
@@ -15,7 +15,7 @@ return new class extends Migration
$table->id();
$table->string('name');
$table->integer('provider_id')->default(0);
$table->integer('sport_id')->default(0)->nullable();
$table->integer('sport_id')->default(0)->nullable()->references('id')->on('sports');
$table->integer('sleep')->default(10);
$table->integer('limit')->default(0);
@@ -14,7 +14,7 @@ return new class extends Migration
Schema::create('odds_3ways', function (Blueprint $table) {
$table->id();
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete();
$table->integer('sport_id')->index()->default(0);
$table->integer('sport_id')->index()->references('id')->on('sports');
$table->integer('bookmaker_id')->default(0);
$table->integer('provider_id')->default(0);
$table->bigInteger('offer_id')->default(0);
@@ -14,7 +14,7 @@ return new class extends Migration
Schema::create('odds_2ways', function (Blueprint $table) {
$table->id();
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete();
$table->integer('sport_id')->index()->default(0);
$table->integer('sport_id')->index()->references('id')->on('sports');
$table->integer('bookmaker_id')->default(0);
$table->integer('provider_id')->default(0);
$table->bigInteger('offer_id')->default(0);
@@ -14,7 +14,7 @@ return new class extends Migration
Schema::create('odds_2ways_s1', function (Blueprint $table) {
$table->id();
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete();
$table->integer('sport_id')->index()->default(0);
$table->integer('sport_id')->index()->references('id')->on('sports');
$table->integer('bookmaker_id')->default(0);
$table->integer('provider_id')->default(0);
$table->bigInteger('offer_id')->default(0);