Merge branch 'main' into directory-refactor

# Conflicts:
#	app/Architecture/Providers/AppServiceProvider.php
#	app/Eloquent/Observers/YearPeriodObserver.php
This commit is contained in:
Adrian Hopek
2022-01-26 08:58:57 +01:00
33 changed files with 979 additions and 55 deletions

View File

@@ -16,7 +16,7 @@ return new class() extends Migration {
$table->string("email")->unique();
$table->string("avatar")->nullable();
$table->string("employment_form");
$table->dateTime("employment_date");
$table->date("employment_date");
$table->rememberToken();
$table->softDeletes();
$table->timestamps();

View File

@@ -5,8 +5,8 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Toby\Models\User;
use Toby\Models\YearPeriod;
use Toby\Eloquent\Models\User;
use Toby\Eloquent\Models\YearPeriod;
return new class() extends Migration {
public function up(): void

View File

@@ -5,23 +5,22 @@ declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Toby\Eloquent\Models\YearPeriod;
return new class() extends Migration {
public function up(): void
{
Schema::create("personal_access_tokens", function (Blueprint $table): void {
Schema::create("holidays", function (Blueprint $table): void {
$table->id();
$table->morphs("tokenable");
$table->foreignIdFor(YearPeriod::class)->constrained()->cascadeOnDelete();
$table->string("name");
$table->string("token", 64)->unique();
$table->text("abilities")->nullable();
$table->timestamp("last_used_at")->nullable();
$table->date("date")->unique();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists("personal_access_tokens");
Schema::dropIfExists("holidays");
}
};