Ich Ich, gros commit

This commit is contained in:
bglacial
2018-10-08 22:31:58 +02:00
parent ecded0947f
commit b11b2befd7
49 changed files with 37276 additions and 11977 deletions

View File

@ -19,6 +19,7 @@ class CreateUsersTable extends Migration
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->enum('role', ['user', 'admin'])->default('user');
$table->rememberToken();
$table->timestamps();
});

View File

@ -15,9 +15,15 @@ class CreateRacesTable extends Migration
{
Schema::create('races', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->dateTime('start_date');
$table->dateTime('end_date');
$table->dateTime('end_date')->nullable();
$table->integer('duration');
$table->integer('autonomie_kart_sec');
$table->integer('autonomie_kart_humide');
$table->integer('relay_default_duration');
$table->string('stand_duration');
$table->text('comment')->nullable();
$table->timestamps();
});
}

View File

@ -16,8 +16,8 @@ class CreateKartsTable extends Migration
Schema::create('karts', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->unique();
$table->integer('race_id')->unsigned();
$table->foreign('race_id')->references('id')->on('races')->onDelete('no action');
$table->dateTime('updated_at');
$table->dateTime('created_at');
});
}

View File

@ -17,6 +17,7 @@ class CreatePilotsTable extends Migration
$table->increments('id');
$table->string('name');
$table->string('first_name');
$table->integer('ref_time');
$table->integer('kart_id')->unsigned();
$table->foreign('kart_id')->references('id')->on('karts')->onDelete('no action');
$table->timestamps();