2020_12_20_080910_create_sa_table.php 2.65 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSaTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('swp_categories_sa', function (Blueprint $table) {
            $table->string('id', 36)->primary();
            $table->string('category_id', 36);
19
            $table->string('name')->nullable();
20 21 22 23 24 25 26 27
            $table->string('userid_created', 36)->nullable();
            $table->string('userid_updated', 36)->nullable();
            $table->timestamps();
        });

        Schema::create('swp_posts_sa', function (Blueprint $table) {
            $table->string('id', 36)->primary();
            $table->string('post_id', 36);
28
            $table->string('title')->nullable();
29 30 31 32 33 34 35 36 37
            $table->text('content')->nullable();
            $table->string('userid_created', 36)->nullable();
            $table->string('userid_updated', 36)->nullable();
            $table->timestamps();
        });

        Schema::create('swp_informations_sa', function (Blueprint $table) {
            $table->string('id', 36)->primary();
            $table->string('information_id', 36);
38
            $table->string('title')->nullable();
39 40 41 42 43 44 45 46 47
            $table->text('content')->nullable();
            $table->string('userid_created', 36)->nullable();
            $table->string('userid_updated', 36)->nullable();
            $table->timestamps();
        });

        Schema::create('swp_menus_sa', function (Blueprint $table) {
            $table->string('id', 36)->primary();
            $table->string('menu_id', 36);
48
            $table->string('name')->nullable();
49 50 51 52 53 54 55 56
            $table->string('userid_created', 36)->nullable();
            $table->string('userid_updated', 36)->nullable();
            $table->timestamps();
        });

        Schema::create('swp_pages_sa', function (Blueprint $table) {
            $table->string('id', 36)->primary();
            $table->string('page_id', 36);
57
            $table->string('title')->nullable();
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
            $table->text('content')->nullable();
            $table->string('userid_created', 36)->nullable();
            $table->string('userid_updated', 36)->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('swp_categories_sa');
        Schema::dropIfExists('swp_posts_sa');
        Schema::dropIfExists('swp_informations_sa');
        Schema::dropIfExists('swp_menus_sa');
        Schema::dropIfExists('swp_pages_sa');
    }
}