Felesleges változók kivéve

This commit is contained in:
Sándor Máté Magony
2025-04-11 13:12:32 +02:00
parent 2975cd91b1
commit 3f0465fb5a
15 changed files with 187 additions and 147 deletions

View File

@@ -1,26 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create("users_table", function (Blueprint $t){
$t -> id();
$t -> string("nev");
$t -> string("email");
$t -> string("felh_nev");
$t -> string('jelszo');
$t -> boolean('is_admin')->default(false);
$t -> timestamps();
});
}
public function down(): void
{
Schema::dropIfExists("users_table");
}
};

View File

@@ -6,12 +6,30 @@ use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('keruletek', function (Blueprint $t) {
$t -> id();
$t -> string('kerulet_nev');
});
Schema::create("felhasznalok", function (Blueprint $t){
$t -> id();
$t -> string("nev");
$t -> string("email");
$t -> string("felh_nev");
$t -> string('jelszo');
$t -> boolean('is_admin')->default(false);
$t -> timestamps();
});
Schema::create('wc_adatok', function (Blueprint $table) {
$table->id();
$table->string('nev', 250);
$table->string('kerulet', 250);
$table->foreignId('kerulet_id') -> references('id') -> on('keruletek');
$table->string('kozeli_megall', 250);
$table->boolean('akadalym')->nullable();
$table->integer('ar')->nullable();
@@ -19,12 +37,16 @@ return new class extends Migration
$table->double('hossz_koord');
$table->double('szel_koord');
$table->string('utvonal', 1000);
$table->foreignId('felhasznalo_id')->references('id')->on('felhasznalok');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('wc_adatok');
//
}
};