2021_04_29_142844_create_tokens_table.php
1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?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')->nullable();
$table->timestamp('check_changes_campaign')->nullable();
$table->timestamp('check_changes_ad_group')->nullable();
$table->timestamps();
$table->unique('token');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tokens');
}
}