Add all files
This commit is contained in:
32
database/migrations/2024_02_15_122233_create_plans_table.php
Normal file
32
database/migrations/2024_02_15_122233_create_plans_table.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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('name')->nullable();
|
||||
$table->morphs('priceable');
|
||||
$table->enum('type', ['free', 'one-time', 'recurring']);
|
||||
$table->integer('billing_period')->nullable();
|
||||
$table->enum('billing_unit', ['hour', 'day', 'week', 'month', 'year'])->nullable();
|
||||
$table->unsignedTinyInteger('sort')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('plans');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user