Files
c-cms-legacy/database/migrations/2014_10_12_000000_create_users_table.php
TheGamecraft 3d7c45c2b2 ALPHA 3.0.2
2018-09-05 13:46:20 -04:00

61 lines
2.2 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('firstname');
$table->string('lastname');
$table->string('email')->unique();
$table->string('password');
$table->string('rank')->default(1);
$table->string('adress')->default('null');
$table->string('telephone')->default('null');
$table->string('age');
$table->string('avatar')->default('null');
$table->string('sexe');
$table->string('job')->default(6);
$table->integer('acces_level')->default(0);
$table->string('schedule_see')->default(0);
$table->string('schedule_edit')->default(0);
$table->string('schedule_notify')->default(0);
$table->string('message_see')->default(0);
$table->string('message_edit')->default(0);
$table->string('message_notify')->default(0);
$table->string('paper_edit')->default(0);
$table->string('paper_publish')->default(0);
$table->string('paper_notify')->default(0);
$table->string('inventory_see')->default(0);
$table->string('inventory_edit')->default(0);
$table->string('inventory_notify')->default(0);
$table->string('user_see')->default(0);
$table->string('user_edit')->default(0);
$table->string('user_notify')->default(0);
$table->string('api_token', 60)->unique()->default(str_random(60));
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}