2021_04_29_142844_create_tokens_table.php 969 Bytes
<?php

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

class CreateTokensTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tokens', function (Blueprint $table) {
            $table->id();
            $table->string('token', 128);
            $table->string('login', 128);
            $table->enum('api', ['yd']);
            $table->enum('type', ['main', 'goal'])->nullable();
            $table->integer('created_by');
            $table->string('timestamp')->nullable();
            $table->timestamp('check_changes_ad_group')->nullable();
            $table->timestamps();

            $table->unique('token');
        });
    }

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