From dc87b1ce159771b592b667bd9c809f33d277f7e0 Mon Sep 17 00:00:00 2001 From: "sosuke.iwabuchi" Date: Sun, 24 Mar 2024 14:15:08 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AD=E3=82=B0=E3=82=A4=E3=83=B3=E3=83=A6?= =?UTF-8?q?=E3=83=BC=E3=82=B6=E3=83=BC=E3=83=9E=E3=82=A4=E3=82=B0=E3=83=AC?= =?UTF-8?q?=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2014_10_12_000000_create_tbl3_mst_users.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/database/migrations/2014_10_12_000000_create_tbl3_mst_users.php b/database/migrations/2014_10_12_000000_create_tbl3_mst_users.php index 31a38ff..2ef7b9e 100644 --- a/database/migrations/2014_10_12_000000_create_tbl3_mst_users.php +++ b/database/migrations/2014_10_12_000000_create_tbl3_mst_users.php @@ -14,20 +14,20 @@ return new class extends Migration public function up(): void { $schema = function (Blueprint $table, MigrationHelper $helper) { - $helper = new MigrationHelper($table); $helper->baseColumn() ->shopId(true); $table->string('name')->nullable()->comment("名前"); $table->string('role')->comment("権限"); - $table->unsignedInteger('customer_id')->comment("顧客ID"); - $table->string('customer_code')->comment("顧客コード"); + $table->unsignedInteger('customer_id')->nullable()->comment("顧客ID"); + $table->string('customer_code')->nullable()->comment("顧客コード"); $table->string('email')->comment("Email"); $table->text('password')->nullable()->comment("ログインパスワード"); }; MigrationHelper::createTable("tbl3_mst_users", $schema, "HTD ログインユーザー"); - MigrationHelper::createTable("tbl3_mst_shop_histories", $schema, "HTD ログインユーザー履歴"); + MigrationHelper::createTable("tbl3_mst_user_histories", $schema, "HTD ログインユーザー履歴"); + MigrationHelper::addUnique("tbl3_mst_users", 1, ["email"]); } @@ -38,6 +38,6 @@ return new class extends Migration public function down(): void { Schema::dropIfExists('tbl3_mst_users'); - Schema::dropIfExists('tbl3_mst_shop_histories'); + Schema::dropIfExists('tbl3_mst_user_histories'); } };