Feat: Moving things, updating OTP, cleaning stuff up

This commit is contained in:
2026-07-03 02:15:31 +03:00
parent 15bff15cad
commit ce08287641
23 changed files with 770 additions and 119 deletions
@@ -0,0 +1,23 @@
<?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('users', function (Blueprint $table) {
$table->string('otp_code', 6)->nullable()->after('password');
$table->timestamp('otp_expires_at')->nullable()->after('otp_code');
});
}
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn(['otp_code', 'otp_expires_at']);
});
}
};
@@ -0,0 +1,23 @@
<?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('lunar_customers', function (Blueprint $table) {
$table->dropColumn(['otp_code', 'otp_expires_at']);
});
}
public function down(): void
{
Schema::table('lunar_customers', function (Blueprint $table) {
$table->string('otp_code', 6)->nullable()->after('meta');
$table->timestamp('otp_expires_at')->nullable()->after('otp_code');
});
}
};
@@ -0,0 +1,30 @@
<?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('users', function (Blueprint $table) {
$table->dropColumn('password');
});
Schema::dropIfExists('password_reset_tokens');
}
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('password')->after('email_verified_at');
});
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
};
@@ -0,0 +1,22 @@
<?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('users', function (Blueprint $table) {
$table->string('name')->nullable()->change();
});
}
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->string('name')->nullable(false)->change();
});
}
};
@@ -0,0 +1,24 @@
<?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('lunar_customers', function (Blueprint $table) {
$table->string('first_name')->nullable()->change();
$table->string('last_name')->nullable()->change();
});
}
public function down(): void
{
Schema::table('lunar_customers', function (Blueprint $table) {
$table->string('first_name')->nullable(false)->change();
$table->string('last_name')->nullable(false)->change();
});
}
};