<?php

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

class CreateSchemaMetadataTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('schema_metadata', function (Blueprint $table) {
            $table->id();
            $table->string('module_name');
            $table->string('create_api_link');
            $table->json('create_api_object');
            $table->string('edit_api_link');
            $table->json('edit_api_object');
            $table->string('get_all_api_link');
            $table->json('get_all_api_object')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('schema_metadata');
    }
}
