vpn.keks.cloud/database/migrations/2014_10_12_000000_create_users_table.php
2020-11-08 03:07:10 +01:00

45 lines
1 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
Schema::create("privileges", function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger("user_id");
$table->boolean("admin")->default(false);
$table->boolean("createVPN")->default(false);
$table->timestamps();
$table->foreign('user_id')->references('id')->on('users');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}