Browse Source

ログインユーザーマイグレーション修正

develop
sosuke.iwabuchi 1 year ago
parent
commit
dc87b1ce15
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      database/migrations/2014_10_12_000000_create_tbl3_mst_users.php

+ 5
- 5
database/migrations/2014_10_12_000000_create_tbl3_mst_users.php View File

@@ -14,20 +14,20 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
$schema = function (Blueprint $table, MigrationHelper $helper) { $schema = function (Blueprint $table, MigrationHelper $helper) {
$helper = new MigrationHelper($table);
$helper->baseColumn() $helper->baseColumn()
->shopId(true); ->shopId(true);


$table->string('name')->nullable()->comment("名前"); $table->string('name')->nullable()->comment("名前");
$table->string('role')->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->string('email')->comment("Email");
$table->text('password')->nullable()->comment("ログインパスワード"); $table->text('password')->nullable()->comment("ログインパスワード");
}; };


MigrationHelper::createTable("tbl3_mst_users", $schema, "HTD ログインユーザー"); 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"]); MigrationHelper::addUnique("tbl3_mst_users", 1, ["email"]);
} }
@@ -38,6 +38,6 @@ return new class extends Migration
public function down(): void public function down(): void
{ {
Schema::dropIfExists('tbl3_mst_users'); Schema::dropIfExists('tbl3_mst_users');
Schema::dropIfExists('tbl3_mst_shop_histories');
Schema::dropIfExists('tbl3_mst_user_histories');
} }
}; };

Loading…
Cancel
Save