feat : 테이블 및 DB 마이그레이션 파일 추가
products - common_codes - parts - products - files - price_histories - boms - bom_items boards - boards - board_settings - posts - board_comments - board_files - post_custom_field_values permissions - menus - roles - user_menu_permissions - role_menu_permissions tenants - tenants - plans - subscriptions - payments
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?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::create('subscriptions', function (Blueprint $table) {
|
||||
$table->id()->comment('PK');
|
||||
$table->foreignId('tenant_id')->constrained('tenants')->comment('테넌트ID');
|
||||
$table->foreignId('plan_id')->constrained('plans')->comment('플랜ID');
|
||||
$table->date('started_at')->comment('구독 시작일');
|
||||
$table->date('ended_at')->nullable()->comment('구독 종료일(해지시)');
|
||||
$table->string('status', 20)->default('active')->comment('상태(active, canceled, expired 등)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void {
|
||||
Schema::dropIfExists('subscriptions');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user