43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('polo', function (Blueprint $table) {
|
|
$table->unsignedBigInteger("id")->primary();
|
|
$table->string("anyag", 40);
|
|
$table->enum("polomeret", ["S", "M", "L", "XL", "XXL"]);
|
|
$table->integer("ar");
|
|
$table->text("cimke");
|
|
$table->decimal("atmero", 5, 2);
|
|
});
|
|
|
|
Schema::create('vasarlo', function (Blueprint $table) {
|
|
$table->unsignedBigInteger("id")->primary();
|
|
$table->string("nev", 100);
|
|
$table->enum("meret", ["S", "M", "L", "XL", "XXL"]);
|
|
$table->boolean("neme")->nullable();
|
|
$table->integer("penz");
|
|
$table->string("torzsvasarloSzam")->unique();
|
|
$table->foreignId("poloId")->references("id")->on("polo");
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists("vasarlo");
|
|
Schema::dropIfExists("polo");
|
|
}
|
|
};
|