2021_06_30_120819_create_ad_extensions_table.php
1.6 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
use App\Models\AdExtension;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAdExtensionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ad_extensions', function (Blueprint $table) {
$table->id();
$table->bigInteger('external_id');
$table->string('callout_text');
$table->boolean('associated');
$table->enum('type', [
AdExtension::TYPE_CALLOUT,
AdExtension::TYPE_UNKNOWN,
]);
$table->enum('state', [
AdExtension::STATE_ON,
AdExtension::STATE_DELETED,
AdExtension::STATE_UNKNOWN,
]);
$table->enum('status', [
AdExtension::STATUS_ACCEPTED,
AdExtension::STATUS_DRAFT,
AdExtension::STATUS_DRAFT,
AdExtension::STATUS_MODERATION,
AdExtension::STATUS_REJECTED,
AdExtension::STATUS_UNKNOWN,
]);
$table->string('status_clarification');
$table->softDeletes();
$table->timestamps();
});
Schema::table('tokens', function (Blueprint $table) {
$table->timestamp('check_changes_ad_extension')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('ad_extensions');
}
}