source: database/migrations/2019_10_25_180621_create_post_reviews_table.php

Last change on this file was d25ba66, checked in by Özkan İliyaz <iliyaz_96@…>, 4 years ago

ADD post confirmation with multiple phases, notification after succesfully password creation

  • Property mode set to 100644
File size: 1.1 KB
Line 
1<?php
2
3use Illuminate\Support\Facades\Schema;
4use Illuminate\Database\Schema\Blueprint;
5use Illuminate\Database\Migrations\Migration;
6
7class CreatePostReviewsTable extends Migration
8{
9 /**
10 * Run the migrations.
11 *
12 * @return void
13 */
14 public function up()
15 {
16 Schema::create('post_reviews', function (Blueprint $table) {
17 $table->bigIncrements('id');
18 $table->integer('post_id')->unsigned();
19 $table->unsignedBigInteger('post_security_id');
20 $table->integer('current_phase');
21 $table->boolean('is_passed_all_phases')->default(false);
22
23 $table->foreign("post_id")
24 ->references("id")
25 ->on("posts")
26 ->onDelete("cascade");
27
28 $table->foreign("post_security_id")
29 ->references("id")
30 ->on("post_securities")
31 ->onDelete("cascade");
32
33 $table->timestamps();
34 });
35 }
36
37 /**
38 * Reverse the migrations.
39 *
40 * @return void
41 */
42 public function down()
43 {
44 Schema::dropIfExists('post_reviews');
45 }
46}
Note: See TracBrowser for help on using the repository browser.