Files
sam-api/database/migrations/2025_10_14_135811_create_prospects_table.php
hskwon 8d2b6fc6e5 feat: 데모 URL 관리 시스템 마이그레이션 및 시더 추가
- users 테이블에 role, is_active 필드 추가
- prospects 테이블 생성 (업체 정보)
- demo_links 테이블 생성 (토큰 관리)
- DemoSystemSeeder 추가 (Ops/Sales 계정, 샘플 데이터)
2025-10-14 14:28:58 +09:00

36 lines
937 B
PHP

<?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('prospects', function (Blueprint $table) {
$table->id();
$table->foreignId('sales_user_id')->constrained('users')->onDelete('cascade');
$table->string('company_name', 100);
$table->string('contact_person', 100)->nullable();
$table->string('email', 100)->nullable();
$table->string('phone', 20)->nullable();
$table->text('notes')->nullable();
$table->timestamps();
$table->index('sales_user_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('prospects');
}
};