2021_05_11_084828_create_campaigns_table.php
1.94 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
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCampaignsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('campaigns', function (Blueprint $table) {
$table->id();
$table->bigInteger('token')->unsigned();
$table->bigInteger('external_id')->unique();
$table->string('name', 255)->nullable();
$table->json('time_targeting')->nullable();
$table->json('negative_keywords')->nullable();
$table->json('blocked_ips')->nullable();
$table->json('excluded_sites')->nullable();
$table->json('daily_budget')->nullable();
$table->string('text_campaign_strategy_search')->nullable();
$table->string('text_campaign_strategy_network')->nullable();
$table->json('settings')->nullable();
$table->json('counter_ids')->nullable();
$table->integer('relevant_keywords_setting_budget_percent')->nullable();
$table->bigInteger('relevant_keywords_setting_optimize_goal_id')->nullable();
$table->string('attribution_model', 4)->nullable();
$table->json('priority_goals')->nullable();
$table->timestamp('updated_self')->nullable();
$table->timestamp('updated_children')->nullable();
$table->boolean('manage')->default(0);
$table->boolean('enabled')->default(1);
$table->timestamp('groups_loaded_at')->nullable();
$table->timestamp('disabled_at')->nullable();
$table->timestamps();
$table->foreign('token')->references('id')->on('tokens');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('campaigns');
}
}