From 6811fb43e548a9b550fcb77ba3ae1e6d443e52a4 Mon Sep 17 00:00:00 2001 From: dkecskes Date: Mon, 20 Oct 2025 21:01:09 +0200 Subject: [PATCH] doplnenie migracii --- ...0_add_role_phone_active_to_users_table.php | 20 ++++++++++++++++++ ...25_10_20_120200_create_companies_table.php | 21 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/backend/database/migrations/2025_10_20_120000_add_role_phone_active_to_users_table.php b/backend/database/migrations/2025_10_20_120000_add_role_phone_active_to_users_table.php index e69de29..6fc7f46 100644 --- a/backend/database/migrations/2025_10_20_120000_add_role_phone_active_to_users_table.php +++ b/backend/database/migrations/2025_10_20_120000_add_role_phone_active_to_users_table.php @@ -0,0 +1,20 @@ +string('phone')->nullable()->after('email'); + $table->enum('role', ['STUDENT','EMPLOYER','ADMIN'])->default('STUDENT')->after('phone'); + $table->boolean('is_active')->default(true)->after('role'); + }); + } + public function down(): void { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn(['phone','role','is_active']); + }); + } +}; diff --git a/backend/database/migrations/2025_10_20_120200_create_companies_table.php b/backend/database/migrations/2025_10_20_120200_create_companies_table.php index e69de29..09c83d9 100644 --- a/backend/database/migrations/2025_10_20_120200_create_companies_table.php +++ b/backend/database/migrations/2025_10_20_120200_create_companies_table.php @@ -0,0 +1,21 @@ +id(); + $table->string('name'); + $table->string('ICO', 20)->nullable()->unique(); + $table->string('address'); + $table->boolean('hiring')->default(false); + $table->timestamps(); + }); + } + public function down(): void { + Schema::dropIfExists('companies'); + } +};