eOSP2/database/migrations/2019_10_05_185538_create_ranks_table.php

41 lines
1.1 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRanksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ranks', function (Blueprint $table) {
$table->integer('id');
$table->string('rank', 60);
});
DB::table('ranks')->insert([ 'id' => '1', 'rank' => 'strażak' ]);
DB::table('ranks')->insert([ 'id' => '2', 'rank' => 'starszy strażak' ]);
DB::table('ranks')->insert([ 'id' => '3', 'rank' => 'dowódca roty' ]);
DB::table('ranks')->insert([ 'id' => '4', 'rank' => 'pomocnik dowódcy sekcji' ]);
DB::table('ranks')->insert([ 'id' => '5', 'rank' => 'dowódca sekcji' ]);
DB::table('ranks')->insert([ 'id' => '6', 'rank' => 'pomocnik dowódcy plutonu' ]);
DB::table('ranks')->insert([ 'id' => '7', 'rank' => 'dowódca plutonu' ]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ranks');
}
}