id(); $table->foreignId('user_id')->nullable()->constrained()->nullOnDelete(); $table->unsignedBigInteger('website_id')->nullable(); $table->unsignedBigInteger('hosting_account_id')->nullable(); $table->unsignedBigInteger('email_domain_id')->nullable(); $table->string('host')->unique(); $table->string('type')->default('custom'); $table->string('source')->default('hosting'); $table->string('onboarding_mode')->default('ns_auto'); $table->string('verification_token')->nullable(); $table->timestamp('verified_at')->nullable(); $table->string('status')->default('pending'); $table->string('ssl_status')->default('pending'); $table->string('onboarding_state')->default('pending_ns'); $table->string('dns_mode')->nullable(); $table->json('ns_expected')->nullable(); $table->json('ns_observed')->nullable(); $table->timestamp('ns_checked_at')->nullable(); $table->timestamp('connected_at')->nullable(); $table->timestamp('mail_ready_at')->nullable(); $table->timestamp('active_at')->nullable(); $table->timestamp('manual_dns_verified_at')->nullable(); $table->json('verification_meta')->nullable(); $table->timestamp('ssl_provisioned_at')->nullable(); $table->timestamp('ssl_expires_at')->nullable(); $table->string('registrar')->nullable(); $table->string('registrar_order_id')->nullable(); $table->timestamps(); $table->index(['user_id', 'host']); $table->index(['source']); $table->index(['hosting_account_id']); }); } public function down(): void { Schema::dropIfExists('domains'); } };