File: /var/www/html/owlcrm/database/migrations/2024_05_30_051336_create_plans_table.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('plans', function (Blueprint $table) {
$table->id();
$table->string('icon');
$table->string('name');
$table->string('key');
$table->text('description');
$table->unsignedTinyInteger('interval')->comment('0 for Monthly, 1 for Yearly');
$table->float('price');
$table->unsignedInteger('trial_days');
$table->tinyInteger('is_test')->default(0)->comment('0: no and 1: yes');
$table->tinyInteger('status')->default(1)->comment('0: disabled and 1: enabled');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('plans');
}
};