2017-06-22 01:10:25 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
2017-06-22 02:44:30 +08:00
|
|
|
class CreateRanksTable extends Migration
|
2017-06-22 01:10:25 +08:00
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
2017-06-22 02:44:30 +08:00
|
|
|
Schema::create('ranks', function (Blueprint $table) {
|
2017-06-22 01:10:25 +08:00
|
|
|
$table->increments('id');
|
2017-07-11 07:54:51 +08:00
|
|
|
$table->string('name', 50);
|
2017-06-22 01:10:25 +08:00
|
|
|
$table->integer('hours')->default(0);
|
2017-06-22 09:18:01 +08:00
|
|
|
$table->boolean('auto_approve_acars')->default(false);
|
|
|
|
$table->boolean('auto_approve_manual')->default(false);
|
2017-06-22 01:26:47 +08:00
|
|
|
$table->boolean('auto_promote')->default(true);
|
2017-06-22 01:10:25 +08:00
|
|
|
$table->timestamps();
|
2017-06-22 09:18:01 +08:00
|
|
|
|
|
|
|
$table->unique('name');
|
2017-06-22 01:10:25 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
2017-12-13 01:49:35 +08:00
|
|
|
Schema::dropIfExists('ranks');
|
2017-06-22 01:10:25 +08:00
|
|
|
}
|
|
|
|
}
|