home
/
forge
/
roadtovirtuosity.com
/
database
/
migrations
➕ New
📤 Upload
✎ Editing:
2023_05_23_101530_create_pieces_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('pieces', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('skill_id'); $table->string('title'); $table->string('slug')->nullable(); $table->integer('point')->nullable(); $table->text('description')->nullable(); $table->text('video_link')->nullable(); $table->integer('level')->nullable(); $table->enum('copyright',['1', '2'])->default('2')->comment('1-Copyrighted, 2-Not Copyrighted'); $table->text('files')->nullable(); $table->enum('status',['1', '2'])->default('1')->comment('1-Active, 2-Non Active'); $table->timestamps(); $table->foreign('skill_id')->references('id')->on('skills')->onDelete('cascade')->onUpdate('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('pieces'); } };
💾 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