vpn.keks.cloud/database/migrations/2014_10_12_000000_create_users_table.php

46 lines
1 KiB
PHP
Raw Permalink Normal View History

2020-11-07 15:09:36 +00:00
<?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();
});
2020-11-08 02:07:10 +00:00
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');
});
2020-11-07 15:09:36 +00:00
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}