Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateWorkshopsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('workshops', function (Blueprint $table) {
- $table->id();
- $table->string('title')->nullable();
- $table->string('flyer')->nullable();
- $table->string('date')->nullable();
- $table->string('status')->nullable();
- $table->string('status_icon')->nullable();
- $table->string('type')->nullable();
- $table->string('admission')->nullable();
- $table->string('time_start')->nullable();
- $table->string('time_finish')->nullable();
- $table->string('platform')->nullable();
- $table->string('refundable')->nullable();
- $table->string('reschedule')->nullable();
- $table->string('description')->nullable();
- $table->string('class_type')->nullable();
- $table->json('requirement')->nullable();
- $table->json('ticket_include')->nullable();
- $table->string('capacity')->nullable();
- $table->string('media_type')->nullable();
- $table->string('location')->nullable();
- $table->json('content')->nullable();
- $table->string('link_workshop')->nullable();
- $table->integer('price_workshop')->nullable();
- $table->longText('address')->nullable();
- $table->string('category_workshop')->nullable();
- $table->string('workshop_certificate_title')->nullable();
- $table->string('workshop_certificate_type')->nullable();
- $table->string('workshop_certificate_shape')->nullable();
- $table->string('workshop_certificate_file')->nullable();
- $table->date('workshop_certificate_date')->nullable();
- $table->string('workshop_certificate_present')->nullable();
- $table->unsignedBigInteger('rate_workshop_id')->nullable();
- $table->unsignedBigInteger('user_id');
- $table->foreign('rate_workshop_id')->references('id')->on('rate_workshops')
- ->onUpdate('cascade')->onDelete('cascade');
- $table->foreign('user_id')->references('id')->on('users')
- ->onUpdate('cascade')->onDelete('cascade');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('workshops');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement