home
/
forge
/
roadtovirtuosity.com
/
database
/
migrations
➕ New
📤 Upload
✎ Editing:
2023_05_23_143436_create_submissions_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('submissions', function (Blueprint $table) { $table->id(); $table->unsignedBigInteger('user_id'); $table->unsignedBigInteger('piece_id')->nullable(); $table->enum('type',['1', '2','3','4'])->default('1')->comment('1-Private, 2-Public, 3-Competition, 4-Certificate'); $table->enum('evaluated_by',['1', '2'])->default('1')->comment('1-Professional, 2-Self'); $table->text('video')->nullable(); $table->integer('point')->nullable(); $table->enum('status',['1', '2', '3'])->default('1')->comment('1-Approved, 2-Rejected, 3-Pending'); $table->boolean('is_verified')->default(0); $table->boolean('is_certificate')->nullable(); $table->boolean('is_competition')->nullable(); $table->timestamps(); $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade'); $table->foreign('piece_id')->references('id')->on('pieces')->onDelete('cascade')->onUpdate('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('submissions'); } };
💾 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