feat: subscriptions
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('identity_verification_requests', function (Blueprint $table): void {
|
||||
$table->ulid('id')->primary();
|
||||
$table->foreignUlid('user_id')->unique()->constrained('users')->cascadeOnDelete();
|
||||
$table->string('status', 32)->default('pending')->index();
|
||||
$table->string('document_disk');
|
||||
$table->string('document_path', 2048)->nullable();
|
||||
$table->string('document_mime_type', 128);
|
||||
$table->unsignedBigInteger('document_size');
|
||||
$table->timestampTz('submitted_at')->index();
|
||||
$table->timestampTz('reviewed_at')->nullable();
|
||||
$table->foreignUlid('reviewed_by')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->text('rejection_reason')->nullable();
|
||||
$table->timestampTz('document_deleted_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('identity_verification_requests');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->timestampTz('certification_purchased_at')
|
||||
->nullable()
|
||||
->after('account_verified_at')
|
||||
->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table): void {
|
||||
$table->dropColumn('certification_purchased_at');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('credit_products', function (Blueprint $table): void {
|
||||
$table->string('purpose', 32)->nullable()->after('type')->unique();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('credit_products', function (Blueprint $table): void {
|
||||
$table->dropColumn('purpose');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user