Merge remote-tracking branch 'origin/master'

# Conflicts:
#	skolehjem/app/MenuPlan.php
This commit is contained in:
Anders
2020-06-30 12:40:02 +02:00
70 changed files with 990 additions and 504 deletions
@@ -13,6 +13,9 @@ class CreateUsersTable extends Migration
*/
public function up()
{
if(Schema::hasTable("users"))
return;
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name_first');
@@ -20,13 +20,17 @@ class CreatePermissionTables extends Migration
throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
}
Schema::create($tableNames['permissions'], function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('description');
$table->string('guard_name');
$table->timestamps();
});
if(!Schema::hasTable("permissions"))
{
Schema::create($tableNames['permissions'], function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('description');
$table->string('guard_name');
$table->timestamps();
});
}
Schema::create($tableNames['roles'], function (Blueprint $table) {
$table->bigIncrements('id');
@@ -1,38 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateStaffTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('staff', function (Blueprint $table) {
$table->id();
$table->string('name_first');
$table->string('name_last');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->integer("phone")->unique();
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('staff');
}
}
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAlbumsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('albums', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->foreignId('user_id')->constrained();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('albums');
}
}
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateResourceExtensions extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('resource_extensions', function (Blueprint $table) {
$table->id();
$table->string("extension")->unique();
$table->text("description");
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('resource_extensions');
}
}