feat: initial project with Phase 1 complete
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
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::create('subscribers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('preregistration_page_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('first_name');
|
||||
$table->string('last_name');
|
||||
$table->string('email');
|
||||
$table->string('phone')->nullable();
|
||||
$table->boolean('synced_to_mailwizz')->default(false);
|
||||
$table->timestamp('synced_at')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['preregistration_page_id', 'email']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('subscribers');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user