home
/
forge
/
roadtovirtuosity.com
/
database
/
migrations
➕ New
📤 Upload
✎ Editing:
2024_02_28_061635_create_billings_table.php
← Back
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; return new class extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('billings', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('student_id'); $table->unsignedBigInteger('teacher_id'); $table->enum('type',['1', '2', '3'])->default('2')->comment('1 = tuition, 2 = piece, 3 = others')->nullable(); $table->string('message')->nullable(); $table->float('amount')->nullable()->default(0); $table->timestamps(); $table->foreign('student_id')->references('id')->on('users')->onDelete('cascade'); $table->foreign('teacher_id')->references('id')->on('admins')->onDelete('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('billings'); } };
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel