dynamic elements and groups
This commit is contained in:
1 parent
80db5b6c6d
commit
0c3142f2fd
42 files changed
+798
-17
No files matched your search
@@ -17,6 +17,7 @@ return new class extends Migration
|
||||
$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();
|
||||
});
|
||||
|
||||
@@ -17,6 +17,7 @@ return new class extends Migration
|
||||
$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();
|
||||
});
|
||||
|
||||
@@ -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,24 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class AddByMethodSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
/**
|
||||
* add_by_methods
|
||||
*/
|
||||
$sql = "INSERT INTO `add_by_methods` (`id`, `name`, `color`, `icon`, `created_at`, `updated_at`)
|
||||
VALUES
|
||||
(1, 'Grapper', 'primary', 'phosphor-download-simple', NULL, NULL),
|
||||
(2, 'Manual', 'success', 'phosphor-user', NULL, NULL),
|
||||
(3, 'DB Mapper', 'warning', 'phosphor-gear', NULL, NULL);
|
||||
";
|
||||
DB::unprepared($sql);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ class DatabaseSeeder extends Seeder
|
||||
OddsTableSeeder::class,
|
||||
AlarmLevelSeeder::class,
|
||||
OddsNameSeeder::class,
|
||||
AddByMethodSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user