Initial commit
This commit is contained in:
42
database/migrations/2026_02_18_190451_tablaletrehoz.php
Normal file
42
database/migrations/2026_02_18_190451_tablaletrehoz.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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");
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user