wip fix
This commit is contained in:
1 parent
9bcd4432c6
commit
6f92f9e1d5
1209 files changed
+220940
No files matched your search
@@ -0,0 +1,66 @@
|
||||
<?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('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->integer('client_id');
|
||||
$table->integer('sport_id')->default(1);
|
||||
$table->integer('bookmaker_id')->nullable();
|
||||
$table->integer('partner_bookmaker_id')->nullable();
|
||||
$table->integer('provider_id')->nullable();
|
||||
|
||||
$table->text('app_authentication_secret')->nullable();
|
||||
$table->text('app_authentication_recovery_codes')->nullable();
|
||||
$table->boolean('has_email_authentication')->default(false);
|
||||
$table->boolean('is_multiline_direct')->default(false);
|
||||
$table->boolean('all_only_none')->default(false);
|
||||
$table->boolean('partner_show')->default(false);
|
||||
$table->boolean('partner_compare')->default(false);
|
||||
$table->boolean('bookmaker_partner_differences')->default(false);
|
||||
$table->boolean('starttime_differences')->default(false);
|
||||
$table->timestamp('app_verified_at')->nullable();
|
||||
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||
$table->string('email')->primary();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->text('user_agent')->nullable();
|
||||
$table->longText('payload');
|
||||
$table->integer('last_activity')->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
Schema::dropIfExists('password_reset_tokens');
|
||||
Schema::dropIfExists('sessions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('cache', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->mediumText('value');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
|
||||
Schema::create('cache_locks', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->string('owner');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('cache');
|
||||
Schema::dropIfExists('cache_locks');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,57 @@
|
||||
<?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('jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
$table->unsignedTinyInteger('attempts');
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
|
||||
Schema::create('job_batches', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->string('name');
|
||||
$table->integer('total_jobs');
|
||||
$table->integer('pending_jobs');
|
||||
$table->integer('failed_jobs');
|
||||
$table->longText('failed_job_ids');
|
||||
$table->mediumText('options')->nullable();
|
||||
$table->integer('cancelled_at')->nullable();
|
||||
$table->integer('created_at');
|
||||
$table->integer('finished_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
Schema::dropIfExists('job_batches');
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
<?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('events', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->boolean('has_markets')->default(0);
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->integer('betsapi_id')->default(0)->nullable()->index();
|
||||
$table->integer('betradar_id')->default(0)->nullable()->index();
|
||||
$table->integer('bet365_id')->default(0)->nullable()->index();
|
||||
$table->integer('_1xbet_id')->default(0)->nullable()->index();
|
||||
$table->integer('bwin_id')->default(0)->nullable()->index();
|
||||
$table->integer('magnig_id')->default(0)->nullable()->index();
|
||||
$table->integer('magken_id')->default(0)->nullable()->index();
|
||||
$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()->references('id')->on('sports');
|
||||
$table->integer('country_id')->default(0)->nullable()->index()->references('id')->on('countries');
|
||||
$table->integer('group_id')->default(0)->nullable()->index()->references('id')->on('groups');
|
||||
$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();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('events');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,82 @@
|
||||
<?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('event_bookmakers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->timestamp('starttime')->nullable();
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->boolean('is_swopped')->default(0);
|
||||
$table->boolean('in_feed')->default(0);
|
||||
$table->boolean('send_status')->default(0);
|
||||
$table->boolean('has_to_qualify')->index()->default(0);
|
||||
|
||||
$table->integer('alarm_2w_h2w')->nullable()->default(0);
|
||||
$table->integer('alarm_2w_a2w')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_2ws1_h2w')->nullable()->default(0);
|
||||
$table->integer('alarm_2ws1_a2w')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_3w_h3w')->nullable()->default(0);
|
||||
$table->integer('alarm_3w_d3w')->nullable()->default(0);
|
||||
$table->integer('alarm_3w_a3w')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_3wht_h3w')->nullable()->default(0);
|
||||
$table->integer('alarm_3wht_d3w')->nullable()->default(0);
|
||||
$table->integer('alarm_3wht_a3w')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_dc_dc1x')->nullable()->default(0);
|
||||
$table->integer('alarm_dc_dc12')->nullable()->default(0);
|
||||
$table->integer('alarm_dc_dcx2')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_dbn_dnb1')->nullable()->default(0);
|
||||
$table->integer('alarm_dbn_dnb2')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_ggng_gg')->nullable()->default(0);
|
||||
$table->integer('alarm_ggng_ng')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_po_home')->nullable()->default(0);
|
||||
$table->integer('alarm_po_away')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_poht_home')->nullable()->default(0);
|
||||
$table->integer('alarm_poht_away')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_poq1_home')->nullable()->default(0);
|
||||
$table->integer('alarm_poq1_away')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_to_over')->nullable()->default(0);
|
||||
$table->integer('alarm_to_under')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_toht_over')->nullable()->default(0);
|
||||
$table->integer('alarm_toht_under')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_toq1_over')->nullable()->default(0);
|
||||
$table->integer('alarm_toq1_under')->nullable()->default(0);
|
||||
|
||||
$table->integer('alarm_tq_htq')->nullable()->default(0);
|
||||
$table->integer('alarm_tq_atq')->nullable()->default(0);
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('event_bookmakers');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('elements', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->integer('betsapi_image_id')->index()->nullable()->default(0);
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('country_id')->default(0)->nullable()->index()->references('id')->on('countries');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('elements');
|
||||
}
|
||||
};
|
||||
@@ -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('element_providers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$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()->references('id')->on('providers');
|
||||
$table->integer('provider_element_id')->index();
|
||||
$table->integer('add_by_method_id')->default(0)->nullable()->index();
|
||||
$table->string('name');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('element_providers');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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('groups', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('fullname')->nullable();
|
||||
$table->string('mgroup')->nullable();
|
||||
$table->integer('sid')->nullable()->deafult(0);
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('competition_group_id')->default(0)->nullable()->index()->references('id')->on('competition_groups');
|
||||
$table->integer('country_id')->default(0)->nullable()->index()->references('id')->on('countries');
|
||||
$table->timestamp('date1');
|
||||
$table->timestamp('date2');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('groups');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('competition_groups', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('level');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('country_id')->default(0)->nullable()->index()->references('id')->on('countries');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('competition_groups');
|
||||
}
|
||||
};
|
||||
@@ -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('competition_group_providers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('competition_group_id')->default(0)->nullable()->index()->references('id')->on('competition_groups');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->integer('provider_group_id')->default(0)->nullable()->index();
|
||||
$table->integer('add_by_method_id')->default(0)->nullable()->index();
|
||||
$table->string('name')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('competition_group_providers');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('countries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('icon')->nullable();
|
||||
$table->string('iso2')->nullable();
|
||||
$table->string('iso3')->nullable();
|
||||
$table->string('cc')->nullable();
|
||||
$table->boolean('is_country')->default(0);
|
||||
$table->boolean('disabled')->default(0);
|
||||
$table->string('season_mode')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('countries');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('sports', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('code')->nullable();
|
||||
$table->string('icon')->nullable();
|
||||
$table->string('color')->nullable();
|
||||
$table->integer('bapi')->default(0);
|
||||
$table->integer('bwin')->default(0);
|
||||
$table->integer('b365')->default(0);
|
||||
$table->integer('logi')->default(0);
|
||||
$table->integer('magl')->default(0);
|
||||
$table->integer('sofascore')->default(0);
|
||||
$table->boolean('is_active')->default(0);
|
||||
$table->timestamps();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sports');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
<?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('supervisors', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->integer('provider_id')->default(0)->nullable()->references('id')->on('providers');
|
||||
$table->integer('sport_id')->references('id')->on('sports')->nullable();
|
||||
$table->integer('special_id')->nullable()->default(0);
|
||||
$table->integer('txodds_market_id')->references('market_id')->on('txodds_market')->nullable();
|
||||
|
||||
$table->integer('sleep')->default(30);
|
||||
$table->integer('limit')->default(0);
|
||||
|
||||
$table->string('runtime')->nullable();
|
||||
$table->string('commandline_options')->nullable();
|
||||
$table->integer('maxsconds')->default(30);
|
||||
$table->integer('lastcall')->default(0);
|
||||
|
||||
$table->boolean('use_lastcall')->default(0);
|
||||
$table->boolean('is_supervisor')->default(0);
|
||||
$table->boolean('is_active')->default(0);
|
||||
|
||||
$table->integer('days_from')->default(10)->nullable();
|
||||
$table->integer('days_to')->default(10)->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('supervisors');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
<?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('odds_3ways_ht', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('h3w', 6, 2)->default(0);
|
||||
$table->decimal('d3w', 6, 2)->default(0);
|
||||
$table->decimal('a3w', 6, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_3ways_ht');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
<?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('odds_3ways', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('h3w', 6, 2)->default(0);
|
||||
$table->decimal('d3w', 6, 2)->default(0);
|
||||
$table->decimal('a3w', 6, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
//
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_3ways');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('odds_2ways_s1', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('h2w', 6, 2)->default(0);
|
||||
$table->decimal('a2w', 6, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_2ways_s1');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('odds_2ways', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('h2w', 6, 2)->default(0);
|
||||
$table->decimal('a2w', 6, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_2ways');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
<?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('odds_dc', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->decimal('dc1x', 6, 2)->default(0);
|
||||
$table->decimal('dc12', 6, 2)->default(0);
|
||||
$table->decimal('dcx2', 6, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_dc');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('odds_dnb', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('dnb1', 6, 2)->default(0);
|
||||
$table->decimal('dnb2', 6, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_dnb');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('odds_ggng', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('gg', 6, 2)->default(0);
|
||||
$table->decimal('ng', 6, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_ggng');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('odds_tq', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('htq', 6, 2)->default(0);
|
||||
$table->decimal('atq', 6, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_tq');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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('odds_points_q1', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('home', 6, 2)->default(0);
|
||||
$table->decimal('away', 6, 2)->default(0);
|
||||
$table->decimal('handicap', 5, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->decimal('difference', 5, 4)->default(0);
|
||||
$table->boolean('active_spread')->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_points_q1');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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('odds_points', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('home', 6, 2)->default(0);
|
||||
$table->decimal('away', 6, 2)->default(0);
|
||||
$table->decimal('handicap', 5, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->decimal('difference', 5, 4)->default(0);
|
||||
$table->boolean('active_spread')->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_points');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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('odds_points_ht', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('home', 6, 2)->default(0);
|
||||
$table->decimal('away', 6, 2)->default(0);
|
||||
$table->decimal('handicap', 5, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->decimal('difference', 5, 4)->default(0);
|
||||
$table->boolean('active_spread')->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_points_ht');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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('odds_totals_ht', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('over', 6, 2)->default(0);
|
||||
$table->decimal('under', 6, 2)->default(0);
|
||||
$table->decimal('total', 5, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->decimal('difference', 5, 4)->default(0);
|
||||
$table->boolean('active_spread')->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_totals_ht');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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('odds_totals_q1', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('over', 6, 2)->default(0);
|
||||
$table->decimal('under', 6, 2)->default(0);
|
||||
$table->decimal('total', 5, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->decimal('difference', 5, 4)->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->boolean('active_spread')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_totals_q1');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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('odds_totals', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->bigInteger('offer_id')->default(0);
|
||||
$table->string('bmoid')->nullable();
|
||||
$table->decimal('over', 6, 2)->default(0);
|
||||
$table->decimal('under', 6, 2)->default(0);
|
||||
$table->decimal('total', 5, 2)->default(0);
|
||||
$table->decimal('margin', 5, 1)->default(0);
|
||||
$table->boolean('flags')->default(0);
|
||||
$table->decimal('difference', 5, 4)->default(0);
|
||||
$table->boolean('active_spread')->default(0);
|
||||
$table->boolean('nuh_check')->default(0);
|
||||
$table->timestamp('last_updated')->useCurrent()->useCurrentOnUpdate();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_totals');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
<?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('bookmakers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('name_short')->nullable();
|
||||
$table->boolean('is_client')->default(0);
|
||||
$table->string('icon')->nullable();
|
||||
$table->string('svg')->nullable();
|
||||
$table->integer('baid')->default(0);
|
||||
$table->boolean('txso')->default(0);
|
||||
$table->boolean('txot')->default(0);
|
||||
$table->boolean('betsapi')->default(0);
|
||||
$table->boolean('direct')->default(0);
|
||||
$table->boolean('is_active')->default(0);
|
||||
$table->boolean('in_soccer')->default(0);
|
||||
$table->boolean('in_other')->default(0);
|
||||
$table->boolean('need_check')->default(0);
|
||||
$table->boolean('deleted')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('bookmakers');
|
||||
}
|
||||
};
|
||||
@@ -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('providers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('color')->nullable();
|
||||
$table->integer('bookmaker_id')->default(0);
|
||||
$table->string('base_url');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('providers');
|
||||
}
|
||||
};
|
||||
@@ -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('clients', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('homepage')->nullable();
|
||||
$table->string('bookmaker')->nullable();
|
||||
$table->string('provider')->nullable();
|
||||
$table->string('sport')->nullable();
|
||||
$table->boolean('is_active')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('clients');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('notifications', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->string('type');
|
||||
$table->morphs('notifiable');
|
||||
$table->text('data');
|
||||
$table->timestamp('read_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('notifications');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,69 @@
|
||||
<?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('bettypes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bettype_id')->default(0)->index();
|
||||
$table->string('name');
|
||||
$table->text('oddsname');
|
||||
$table->boolean('disabled')->default(0);
|
||||
$table->boolean('can_odds_closed')->default(0);
|
||||
$table->boolean('is_spread')->default(0);
|
||||
$table->boolean('ft')->default(0);
|
||||
$table->boolean('ht')->default(0);
|
||||
$table->boolean('h2')->default(0);
|
||||
$table->boolean('co')->default(0);
|
||||
$table->boolean('q1')->default(0);
|
||||
$table->boolean('q2')->default(0);
|
||||
$table->boolean('q3')->default(0);
|
||||
$table->boolean('q4')->default(0);
|
||||
$table->boolean('p1')->default(0);
|
||||
$table->boolean('p2')->default(0);
|
||||
$table->boolean('p3')->default(0);
|
||||
$table->boolean('s1')->default(0);
|
||||
$table->boolean('s2')->default(0);
|
||||
$table->boolean('s3')->default(0);
|
||||
$table->boolean('s4')->default(0);
|
||||
$table->boolean('s5')->default(0);
|
||||
$table->boolean('hth2')->default(0);
|
||||
$table->boolean('htft')->default(0);
|
||||
$table->boolean('and')->default(0);
|
||||
$table->boolean('or')->default(0);
|
||||
$table->boolean('nb')->default(0);
|
||||
$table->boolean('home')->default(0);
|
||||
$table->boolean('away')->default(0);
|
||||
$table->boolean('sup')->default(0);
|
||||
$table->boolean('goals')->default(0);
|
||||
$table->boolean('shots')->default(0);
|
||||
$table->boolean('target')->default(0);
|
||||
$table->boolean('corner')->default(0);
|
||||
$table->boolean('cards')->default(0);
|
||||
$table->boolean('pgoal')->default(0);
|
||||
$table->boolean('pcard')->default(0);
|
||||
$table->boolean('pshots')->default(0);
|
||||
$table->boolean('passist')->default(0);
|
||||
$table->integer('number_odds')->default(0);
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('bettypes');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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('matchparts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('short');
|
||||
$table->string('name');
|
||||
$table->string('color');
|
||||
$table->boolean('is_active')->default(0);
|
||||
$table->integer('soccer')->default(0);
|
||||
$table->integer('icehockey')->default(0);
|
||||
$table->integer('basketball')->default(0);
|
||||
$table->integer('tennis')->default(0);
|
||||
$table->integer('handball')->default(0);
|
||||
$table->integer('rugby')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('matchparts');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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('multiline_clients', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('client_bookmaker_id')->default(0);
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->boolean('disabled')->default(0);
|
||||
$table->integer('multiline_setting_id')->default(1)->references('id')->on('multiline_settings');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('position')->default(0);
|
||||
$table->integer('sort')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('multiline_clients');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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('multiline_settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('sport_id')->references('id')->on('sports');
|
||||
$table->string('name');
|
||||
$table->string('short');
|
||||
$table->string('table');
|
||||
$table->string('oddnames');
|
||||
$table->string('matchpart');
|
||||
$table->integer('rows')->default(4);
|
||||
$table->integer('has_3_columns')->default(0);
|
||||
$table->integer('sorting')->default(0)->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('multiline_settings');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
<?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('mappers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('event_id')->index();
|
||||
$table->integer('betradar_id')->default(0)->nullable()->index();
|
||||
$table->integer('betsapi_id')->default(0)->nullable()->index();
|
||||
$table->integer('bet365_id')->default(0)->nullable()->index();
|
||||
$table->integer('sport_id')->index();
|
||||
$table->integer('provider_id')->default(0)->nullable()->index()->references('id')->on('providers');
|
||||
$table->dateTime('starttime')->nullable();
|
||||
$table->string('country')->nullable();
|
||||
$table->integer('country_id')->default(0)->nullable()->index();
|
||||
$table->string('group')->nullable();
|
||||
$table->integer('group_id')->default(0)->nullable()->index();
|
||||
$table->string('group_cc')->nullable();
|
||||
$table->string('home')->nullable();
|
||||
$table->integer('home_id')->default(0)->nullable()->index();
|
||||
$table->string('home_cc')->nullable();
|
||||
$table->string('away')->nullable();
|
||||
$table->integer('away_id')->default(0)->nullable()->index();
|
||||
$table->string('away_cc')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('mappers');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('bettype_users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('user_id')->index();
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('multiline_setting_id')->index();
|
||||
$table->integer('sorting')->default(0)->nullable();
|
||||
$table->boolean('is_active')->default(false)->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('bettype_users');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,134 @@
|
||||
<?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
|
||||
{
|
||||
$teams = config('permission.teams');
|
||||
$tableNames = config('permission.table_names');
|
||||
$columnNames = config('permission.column_names');
|
||||
$pivotRole = $columnNames['role_pivot_key'] ?? 'role_id';
|
||||
$pivotPermission = $columnNames['permission_pivot_key'] ?? 'permission_id';
|
||||
|
||||
throw_if(empty($tableNames), Exception::class, 'Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
throw_if($teams && empty($columnNames['team_foreign_key'] ?? null), Exception::class, 'Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
|
||||
Schema::create($tableNames['permissions'], static function (Blueprint $table) {
|
||||
// $table->engine('InnoDB');
|
||||
$table->bigIncrements('id'); // permission id
|
||||
$table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format)
|
||||
$table->string('guard_name'); // For MyISAM use string('guard_name', 25);
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['name', 'guard_name']);
|
||||
});
|
||||
|
||||
Schema::create($tableNames['roles'], static function (Blueprint $table) use ($teams, $columnNames) {
|
||||
// $table->engine('InnoDB');
|
||||
$table->bigIncrements('id'); // role id
|
||||
if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable();
|
||||
$table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index');
|
||||
}
|
||||
$table->string('name'); // For MyISAM use string('name', 225); // (or 166 for InnoDB with Redundant/Compact row format)
|
||||
$table->string('guard_name'); // For MyISAM use string('guard_name', 25);
|
||||
$table->timestamps();
|
||||
if ($teams || config('permission.testing')) {
|
||||
$table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']);
|
||||
} else {
|
||||
$table->unique(['name', 'guard_name']);
|
||||
}
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_permissions'], static function (Blueprint $table) use ($tableNames, $columnNames, $pivotPermission, $teams) {
|
||||
$table->unsignedBigInteger($pivotPermission);
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index');
|
||||
|
||||
$table->foreign($pivotPermission)
|
||||
->references('id') // permission id
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
if ($teams) {
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key']);
|
||||
$table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index');
|
||||
|
||||
$table->primary([$columnNames['team_foreign_key'], $pivotPermission, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_permissions_permission_model_type_primary');
|
||||
} else {
|
||||
$table->primary([$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_permissions_permission_model_type_primary');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_roles'], static function (Blueprint $table) use ($tableNames, $columnNames, $pivotRole, $teams) {
|
||||
$table->unsignedBigInteger($pivotRole);
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index');
|
||||
|
||||
$table->foreign($pivotRole)
|
||||
->references('id') // role id
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
if ($teams) {
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key']);
|
||||
$table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index');
|
||||
|
||||
$table->primary([$columnNames['team_foreign_key'], $pivotRole, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_roles_role_model_type_primary');
|
||||
} else {
|
||||
$table->primary([$pivotRole, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_roles_role_model_type_primary');
|
||||
}
|
||||
});
|
||||
|
||||
Schema::create($tableNames['role_has_permissions'], static function (Blueprint $table) use ($tableNames, $pivotRole, $pivotPermission) {
|
||||
$table->unsignedBigInteger($pivotPermission);
|
||||
$table->unsignedBigInteger($pivotRole);
|
||||
|
||||
$table->foreign($pivotPermission)
|
||||
->references('id') // permission id
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign($pivotRole)
|
||||
->references('id') // role id
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->primary([$pivotPermission, $pivotRole], 'role_has_permissions_permission_id_role_id_primary');
|
||||
});
|
||||
|
||||
app('cache')
|
||||
->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null)
|
||||
->forget(config('permission.cache.key'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
$tableNames = config('permission.table_names');
|
||||
|
||||
throw_if(empty($tableNames), Exception::class, 'Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.');
|
||||
|
||||
Schema::drop($tableNames['role_has_permissions']);
|
||||
Schema::drop($tableNames['model_has_roles']);
|
||||
Schema::drop($tableNames['model_has_permissions']);
|
||||
Schema::drop($tableNames['roles']);
|
||||
Schema::drop($tableNames['permissions']);
|
||||
}
|
||||
};
|
||||
@@ -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('element_groups', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('element_id')->default(0)->nullable()->index()->references('id')->on('elements');
|
||||
$table->integer('competition_group_id')->default(0)->nullable()->index()->references('id')->on('competition_groups');
|
||||
$table->integer('group_id')->default(0)->nullable()->index()->references('id')->on('groups');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('element_groups');
|
||||
}
|
||||
};
|
||||
@@ -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('event_user_stars', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('user_id')->index()->references('id')->on('users');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('event_user_stars');
|
||||
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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('txodds_markets', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('market_id')->nullable();
|
||||
$table->string('shortname');
|
||||
$table->string('name');
|
||||
$table->boolean(column: 'soccer')->default(0);
|
||||
$table->boolean(column: 'ice_hockey')->default(0);
|
||||
$table->boolean(column: 'basketball')->default(0);
|
||||
$table->boolean(column: 'tennis')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('txodds_markets');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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('countries_italians', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('en')->nullable();
|
||||
$table->string('it')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('countries_italians');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('comparing_bookmakers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('method_id');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('client_bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('time_lastcheck')->default(0);
|
||||
$table->integer('margin_threshold')->default(0);
|
||||
$table->boolean('is_active')->default(false);
|
||||
$table->integer('sorting')->nullable()->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('comparing_bookmakers');
|
||||
}
|
||||
};
|
||||
@@ -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('alarm_settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('client_bookmaker_id')->default(0);
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->boolean('disabled')->default(0);
|
||||
$table->integer('multiline_setting_id')->default(1)->references('id')->on('multiline_settings');
|
||||
$table->integer('alarm_level_id')->default(0);
|
||||
$table->decimal('alarm_threshold', 3, 2)->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('alarm_settings');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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('odds_tables', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('title');
|
||||
$table->string('fulltitle');
|
||||
$table->boolean(column: 'has_active_spread')->default(0);
|
||||
$table->string('oddnames');
|
||||
$table->string('fieldnames');
|
||||
$table->boolean('soccer')->default(false);
|
||||
$table->boolean('other')->default(false);
|
||||
$table->boolean('icehockey')->default(false);
|
||||
$table->boolean('basketball')->default(false);
|
||||
$table->boolean('tennis')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_tables');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('event_user_notes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->constrained()->cascadeOnDelete();
|
||||
$table->integer('bookmaker_id')->default(0);
|
||||
$table->integer('user_id')->index()->references('id')->on('users');
|
||||
$table->integer('client_id')->default(0);
|
||||
$table->string('message');
|
||||
$table->integer('deleted')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('event_user_notes');
|
||||
}
|
||||
};
|
||||
|
||||
// a make:filament-relation-manager CategoryResource posts title
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('client_group_lists', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('client_id');
|
||||
$table->text('client_groups')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('client_group_lists');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('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');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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_notification_sends', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('event_id')->index()->constrained()->cascadeOnDelete()->references('id')->on('events');
|
||||
$table->integer('user_id')->index()->references('id')->on('users');
|
||||
$table->integer('bookmaker_id')->index()->references('id')->on('bookmakers');
|
||||
$table->integer('alarm_level_id')->default(0);
|
||||
$table->string('fieldname');
|
||||
$table->boolean('notify_by_system')->default(0);
|
||||
$table->boolean('notify_by_email')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
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');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('odds_names', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('alarm');
|
||||
$table->string('table');
|
||||
$table->string('bettype');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('odds_names');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('user_activities', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedInteger('user_id')->nullable();
|
||||
$table->string('session_id');
|
||||
$table->string('url')->nullable();
|
||||
$table->string('ip')->nullable();
|
||||
$table->string('country')->nullable();
|
||||
$table->string('location')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('user_activities');
|
||||
}
|
||||
};
|
||||
@@ -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('add_by_methods', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('color');
|
||||
$table->string('icon');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('add_by_methods');
|
||||
}
|
||||
};
|
||||
@@ -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('major_groups', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('country_id')->default(0)->nullable()->index()->references('id')->on('countries');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('major_groups');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('imports', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->timestamp('completed_at')->nullable();
|
||||
$table->string('file_name');
|
||||
$table->string('file_path');
|
||||
$table->string('importer');
|
||||
$table->unsignedInteger('processed_rows')->default(0);
|
||||
$table->unsignedInteger('total_rows');
|
||||
$table->unsignedInteger('successful_rows')->default(0);
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('imports');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('exports', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->timestamp('completed_at')->nullable();
|
||||
$table->string('file_disk');
|
||||
$table->string('file_name')->nullable();
|
||||
$table->string('exporter');
|
||||
$table->unsignedInteger('processed_rows')->default(0);
|
||||
$table->unsignedInteger('total_rows');
|
||||
$table->unsignedInteger('successful_rows')->default(0);
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('exports');
|
||||
}
|
||||
};
|
||||
@@ -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('failed_import_rows', function (Blueprint $table): void {
|
||||
$table->id();
|
||||
$table->json('data');
|
||||
$table->foreignId('import_id')->constrained()->cascadeOnDelete();
|
||||
$table->text('validation_error')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('failed_import_rows');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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('statistiko_imports', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('sport_id')->default(0);
|
||||
$table->string('data_type');
|
||||
$table->string('file_name');
|
||||
$table->string('file_name_original');
|
||||
$table->boolean('run_import')->default(0);
|
||||
$table->boolean('is_running')->default(0);
|
||||
$table->boolean('has_run')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('statistiko_imports');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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('statistic_fixtures', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('sport_id')->index();
|
||||
$table->integer('league_id')->index();
|
||||
$table->integer('home_id')->index();
|
||||
$table->integer('away_id')->index();
|
||||
$table->dateTime('starttime')->index();
|
||||
$table->decimal('exp_home', 15, 14)->default(0);
|
||||
$table->decimal('exp_away', 15, 14)->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('statistic_fixtures');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use MongoDB\Laravel\Schema\Blueprint;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
protected $connection = 'mongodb';
|
||||
|
||||
/**
|
||||
* Player Details
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('details', function (Blueprint $collection) {
|
||||
$collection->unique('ss_player_id');
|
||||
$collection->index('ss_team_id');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('details');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use MongoDB\Laravel\Schema\Blueprint;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
protected $connection = 'mongodb';
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('events', function (Blueprint $collection) {
|
||||
$collection->index('sport_id');
|
||||
$collection->index('match_id');
|
||||
$collection->index('league_id');
|
||||
$collection->index('home_id');
|
||||
$collection->index('away_id');
|
||||
$collection->index('starttime');
|
||||
$collection->index('season');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('events');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use MongoDB\Laravel\Schema\Blueprint;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
protected $connection = 'mongodb';
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('players', function (Blueprint $collection) {
|
||||
$collection->index('match_id');
|
||||
$collection->index('ss_player_id');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('players');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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('sofa_score_tournaments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||
$table->integer('tournament_id')->index();
|
||||
$table->integer('sofa_score_category_id')->index();
|
||||
$table->string('slug')->index();
|
||||
$table->string('name');
|
||||
$table->boolean('enabled')->index()->default(0);
|
||||
$table->boolean('disabled')->index()->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sofa_score_tournaments');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('sofa_score_categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('slug')->index();
|
||||
$table->string('season_mode')->index();
|
||||
$table->string('flag')->index();
|
||||
$table->boolean('in_soccer')->default(0);
|
||||
$table->integer('country_id')->nullable()->index();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sofa_score_categories');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('sofa_score_day_tournaments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('tournament_id')->index();
|
||||
$table->integer('sport_id')->index();
|
||||
$table->date('day')->index();
|
||||
$table->boolean('grapped')->index()->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sofa_score_day_tournaments');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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('ss_player_seasons', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('ss_player_id')->index()->default(0);
|
||||
$table->integer('ss_team_id')->index()->default(0);
|
||||
$table->string('season')->index()->default('');
|
||||
$table->integer('total_events')->default(0)->nullable();
|
||||
$table->integer('total_min')->default(0)->nullable();
|
||||
$table->integer('average_min')->default(0)->nullable();
|
||||
$table->integer('events_played_home')->default(0)->nullable();
|
||||
$table->integer('events_played_away')->default(0)->nullable();
|
||||
$table->integer('minutes_played_home')->default(0)->nullable();
|
||||
$table->integer('minutes_played_away')->default(0)->nullable();
|
||||
$table->integer('goals')->default(0)->nullable();
|
||||
$table->integer('fouls')->default(0)->nullable();
|
||||
$table->integer('cards')->default(0)->nullable();
|
||||
$table->integer('offsides')->default(0)->nullable();
|
||||
$table->integer('shots_on_target')->default(0)->nullable();
|
||||
$table->integer('shots_off_target')->default(0)->nullable();
|
||||
$table->integer('shots_blocked')->default(0)->nullable();
|
||||
$table->integer('total_shots')->default(0)->nullable();
|
||||
$table->unique(['ss_player_id', 'ss_team_id', 'season']);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('ss_player_seasons');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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('sofa_score_tasks', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('mode');
|
||||
$table->integer('sport_id');
|
||||
$table->date('day_from')->nullable();
|
||||
$table->date('day_to')->nullable();
|
||||
$table->boolean('is_active')->default(0);
|
||||
$table->boolean('compleated')->default(0);
|
||||
$table->dateTime('last_start')->nullable();
|
||||
$table->dateTime('last_end')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sofa_score_tasks');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('sofa_score_task_tournaments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('sofa_score_task_id');
|
||||
$table->integer('sofa_score_tournament_id');
|
||||
$table->integer('sofa_score_category_id');
|
||||
$table->boolean('disabled')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sofa_score_task_tournaments');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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('sofa_score_event_grappeds', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('grapper_id')->default(0)->nullable();
|
||||
$table->date('day')->nullable();
|
||||
$table->string('liga')->nullable();
|
||||
$table->string('name')->nullable();
|
||||
$table->dateTime('starttime')->nullable();
|
||||
$table->string('url')->nullable();
|
||||
$table->boolean('got_statistics')->default(false);
|
||||
$table->boolean('got_lineups')->default(false);
|
||||
$table->boolean('got_odds')->default(false);
|
||||
$table->boolean('got_incidents')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sofa_score_event_grappeds');
|
||||
}
|
||||
};
|
||||
@@ -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('sofa_score_task_days', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('grapper_id');
|
||||
$table->date('day')->nullable();
|
||||
$table->boolean('done')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sofa_score_task_days');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('sofa_score_rosas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('sport_id')->index();
|
||||
$table->string('cc');
|
||||
$table->integer('country_id')->default(0)->nullable()->index()->references('id')->on('countries');
|
||||
$table->integer('ss_team_id')->index();
|
||||
$table->string('ss_team_name');
|
||||
$table->string('slug')->nullable();
|
||||
$table->boolean('is_active')->default(false);
|
||||
$table->boolean('disabled')->default(false);
|
||||
$table->boolean('grapped')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sofa_score_rosas');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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('rosa_tournaments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('rosa_tournaments');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('sofa_score_rosa_tournaments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('ss_team_id')->index();
|
||||
$table->integer('ss_tournament_id')->default(0)->nullable()->index();
|
||||
$table->boolean('disabled')->default(false);
|
||||
$table->boolean('grapped')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sofa_score_rosa_tournaments');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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('sofa_score_player_positions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('ss_code')->index();
|
||||
$table->string('name');
|
||||
$table->string('generalposition');
|
||||
$table->decimal('exp_goals', 4, 3)->default(0);
|
||||
$table->decimal('exp_assists', 4, 3)->default(0);
|
||||
$table->decimal('exp_cards', 4, 3)->default(0);
|
||||
$table->decimal('exp_fouls', 4, 3)->default(0);
|
||||
$table->decimal('exp_was_fouled', 4, 3)->default(0);
|
||||
$table->decimal('exp_offsides', 4, 3)->default(0);
|
||||
$table->decimal('exp_total_shots', 4, 3)->default(0);
|
||||
$table->decimal('exp_shots_on_target', 4, 3)->default(0);
|
||||
$table->decimal('minexp_goals', 4, 3)->default(0);
|
||||
$table->decimal('minexp_assists', 4, 3)->default(0);
|
||||
$table->decimal('minexp_cards', 4, 3)->default(0);
|
||||
$table->decimal('minexp_fouls', 4, 3)->default(0);
|
||||
$table->decimal('minexp_was_fouled', 4, 3)->default(0);
|
||||
$table->decimal('minexp_offsides', 4, 3)->default(0);
|
||||
$table->decimal('minexp_total_shots', 4, 3)->default(0);
|
||||
$table->decimal('minexp_shots_on_target', 4, 3)->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sofa_score_player_positions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('statistiko_configs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('group');
|
||||
$table->string('team');
|
||||
$table->string('varname');
|
||||
$table->decimal('value', 3, 2)->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('statistiko_configs');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,29 @@
|
||||
<?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('sofa_score_player_caches', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('hash')->index();
|
||||
$table->json('players');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sofa_score_player_caches');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('ss_lineup_memories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('client_id')->index();
|
||||
$table->integer('team_id')->index();
|
||||
$table->string('lineup');
|
||||
$table->string('team_name');
|
||||
$table->text('placement');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('ss_lineup_memories');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('expected_minimum_positions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('position');
|
||||
$table->decimal('gls', 4, 3)->default(0);
|
||||
$table->decimal('crd', 4, 3)->default(0);
|
||||
$table->decimal('fls', 4, 3)->default(0);
|
||||
$table->decimal('ofs', 4, 3)->default(0);
|
||||
$table->decimal('tsh', 4, 3)->default(0);
|
||||
$table->decimal('snt', 4, 3)->default(0);
|
||||
$table->decimal('wlf', 4, 3)->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('expected_minimum_positions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Get the migration connection name.
|
||||
*/
|
||||
public function getConnection(): ?string
|
||||
{
|
||||
return config('telescope.storage.database.connection');
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
$schema = Schema::connection($this->getConnection());
|
||||
|
||||
$schema->create('telescope_entries', function (Blueprint $table) {
|
||||
$table->bigIncrements('sequence');
|
||||
$table->uuid('uuid');
|
||||
$table->uuid('batch_id');
|
||||
$table->string('family_hash')->nullable();
|
||||
$table->boolean('should_display_on_index')->default(true);
|
||||
$table->string('type', 20);
|
||||
$table->longText('content');
|
||||
$table->dateTime('created_at')->nullable();
|
||||
|
||||
$table->unique('uuid');
|
||||
$table->index('batch_id');
|
||||
$table->index('family_hash');
|
||||
$table->index('created_at');
|
||||
$table->index(['type', 'should_display_on_index']);
|
||||
});
|
||||
|
||||
$schema->create('telescope_entries_tags', function (Blueprint $table) {
|
||||
$table->uuid('entry_uuid');
|
||||
$table->string('tag');
|
||||
|
||||
$table->primary(['entry_uuid', 'tag']);
|
||||
$table->index('tag');
|
||||
|
||||
$table->foreign('entry_uuid')
|
||||
->references('uuid')
|
||||
->on('telescope_entries')
|
||||
->cascadeOnDelete();
|
||||
});
|
||||
|
||||
$schema->create('telescope_monitoring', function (Blueprint $table) {
|
||||
$table->string('tag')->primary();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
$schema = Schema::connection($this->getConnection());
|
||||
|
||||
$schema->dropIfExists('telescope_entries_tags');
|
||||
$schema->dropIfExists('telescope_entries');
|
||||
$schema->dropIfExists('telescope_monitoring');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Get the migration connection name.
|
||||
*/
|
||||
public function getConnection(): ?string
|
||||
{
|
||||
return config('telescope.storage.database.connection');
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
$schema = Schema::connection($this->getConnection());
|
||||
|
||||
$schema->create('telescope_entries', function (Blueprint $table) {
|
||||
$table->bigIncrements('sequence');
|
||||
$table->uuid('uuid');
|
||||
$table->uuid('batch_id');
|
||||
$table->string('family_hash')->nullable();
|
||||
$table->boolean('should_display_on_index')->default(true);
|
||||
$table->string('type', 20);
|
||||
$table->longText('content');
|
||||
$table->dateTime('created_at')->nullable();
|
||||
|
||||
$table->unique('uuid');
|
||||
$table->index('batch_id');
|
||||
$table->index('family_hash');
|
||||
$table->index('created_at');
|
||||
$table->index(['type', 'should_display_on_index']);
|
||||
});
|
||||
|
||||
$schema->create('telescope_entries_tags', function (Blueprint $table) {
|
||||
$table->uuid('entry_uuid');
|
||||
$table->string('tag');
|
||||
|
||||
$table->primary(['entry_uuid', 'tag']);
|
||||
$table->index('tag');
|
||||
|
||||
$table->foreign('entry_uuid')
|
||||
->references('uuid')
|
||||
->on('telescope_entries')
|
||||
->cascadeOnDelete();
|
||||
});
|
||||
|
||||
$schema->create('telescope_monitoring', function (Blueprint $table) {
|
||||
$table->string('tag')->primary();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
$schema = Schema::connection($this->getConnection());
|
||||
|
||||
$schema->dropIfExists('telescope_entries_tags');
|
||||
$schema->dropIfExists('telescope_entries');
|
||||
$schema->dropIfExists('telescope_monitoring');
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user