|
|
@@ -0,0 +1,26 @@
|
|
|
+<?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::table('customers', function (Blueprint $table) {
|
|
|
+ $table->unsignedBigInteger('migrated_from_asteria_id')->nullable()->after('id');
|
|
|
+ $table->text('legacy_password')->nullable()->after('password');
|
|
|
+
|
|
|
+ $table->unique('migrated_from_asteria_id', 'uq_customers_migrated_asteria_id');
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ public function down(): void
|
|
|
+ {
|
|
|
+ Schema::table('customers', function (Blueprint $table) {
|
|
|
+ $table->dropUnique('uq_customers_migrated_asteria_id');
|
|
|
+ $table->dropColumn(['migrated_from_asteria_id', 'legacy_password']);
|
|
|
+ });
|
|
|
+ }
|
|
|
+};
|