toby/database/migrations/2022_04_12_152528_create_keys_table.php
Adrian Hopek d60dc75f99
#118 - keys (#128)
* #118 - wip

* #118 - keys

* #118 - fix

* #118 - fix menu

* #118 - fix to policies and added translations

* #118 - wip

* #118 - tests

* #118 - fix

* #118 - fix

* #118 - fix

* Update resources/lang/pl.json

Co-authored-by: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com>

* #118 - cr fix

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
Co-authored-by: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com>
2022-04-21 08:16:31 +02:00

27 lines
615 B
PHP

<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Toby\Eloquent\Models\User;
return new class() extends Migration {
public function up(): void
{
Schema::create("keys", function (Blueprint $table): void {
$table->id();
$table->foreignIdFor(User::class)
->constrained()
->cascadeOnDelete();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists("keys");
}
};