Archived
1
0
Fork 0

Initial Commit

This commit is contained in:
Henrik Hautakoski 2021-10-18 11:53:33 +02:00
commit ddf09fe00c
113 changed files with 187148 additions and 0 deletions

View file

@ -0,0 +1,50 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class Base extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings', function (Blueprint $table) {
$table->id();
$table->timestamp('created_at')->useCurrent();
$table->json('value');
});
Schema::create('characters', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->softDeletes();
});
Schema::create('raids', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->softDeletes();
});
Schema::create('cards', function (Blueprint $table) {
$table->id();
$table->foreignId('character_id')->nullable()->constrained();
$table->foreignId('raid_id')->nullable()->constrained();
$table->enum('role', ['tank', 'healer', 'dps'])->nullable();
$table->enum('class', ['warrior', 'rogue', 'paladin', 'hunter', 'mage', 'warlock', 'shaman', 'druid', 'priest'])->nullable();
$table->string('body');
$table->softDeletes();
});
Schema::create('card_raids', function (Blueprint $table) {
$table->id();
$table->foreignId('raid_id')->constrained();
$table->foreignId('card_id')->constrained();
});
}
}