1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
|
4
|
|
|
use Illuminate\Database\Schema\Blueprint; |
5
|
|
|
use Illuminate\Database\Migrations\Migration; |
6
|
|
|
|
7
|
|
|
|
8
|
|
|
class CreateBotsTables extends Migration |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* Run the migrations. |
12
|
|
|
* |
13
|
|
|
* @return void |
14
|
|
|
*/ |
15
|
|
|
public function up() |
16
|
|
|
{ |
17
|
|
|
Schema::create( |
18
|
|
|
'bot_runners', function (Blueprint $table) { |
19
|
|
|
$table->increments('id'); |
20
|
|
|
$table->string('action_code')->nullable(); |
21
|
|
|
$table->string('target_id')->nullable(); |
22
|
|
|
$table->string('progress')->nullable(); |
23
|
|
|
$table->string('stage')->nullable(); |
24
|
|
|
$table->timestamps(); |
25
|
|
|
} |
26
|
|
|
); |
27
|
|
|
Schema::create( |
28
|
|
|
'bot_internet_urls', function (Blueprint $table) { |
29
|
|
|
$table->increments('id'); |
30
|
|
|
$table->string('url')->nullable(); |
31
|
|
|
$table->string('type')->nullable(); //get ou post |
32
|
|
|
$table->string('response_format')->nullable(); //html ou json, ou xml |
33
|
|
|
$table->string('title')->nullable(); |
34
|
|
|
$table->string('crawled')->nullable(); |
35
|
|
|
$table->string('crawl_tag')->nullable(); |
36
|
|
|
$table->string('clicks')->nullable(); |
37
|
|
|
$table->string('links')->nullable(); |
38
|
|
|
$table->integer('infra_domain_id')->nullable(); |
39
|
|
|
$table->integer('bot_internet_url_form_id')->nullable(); |
40
|
|
|
$table->timestamps(); |
41
|
|
|
} |
42
|
|
|
); |
43
|
|
|
Schema::create( |
44
|
|
|
'bot_internet_url_links', function (Blueprint $table) { |
45
|
|
|
$table->increments('id'); |
46
|
|
|
$table->integer('from_bot_internet_url_id')->nullable(); |
47
|
|
|
$table->integer('to_bot_internet_url_id')->nullable(); |
48
|
|
|
$table->timestamps(); |
49
|
|
|
} |
50
|
|
|
); |
51
|
|
|
Schema::create( |
52
|
|
|
'bot_internet_url_forms', function (Blueprint $table) { |
53
|
|
|
$table->increments('id'); |
54
|
|
|
$table->string('identify')->nullable(); |
55
|
|
|
$table->string('name')->nullable(); |
56
|
|
|
$table->string('url')->nullable(); |
57
|
|
|
$table->integer('from_bot_internet_url_id')->nullable(); // SIte aonde o formulario esta sendo preencido |
58
|
|
|
$table->integer('to_bot_internet_url_id')->nullable(); // Site para onde o formulario esta indo |
59
|
|
|
$table->timestamps(); |
60
|
|
|
} |
61
|
|
|
); |
62
|
|
|
Schema::create( |
63
|
|
|
'bot_internet_url_form_fields', function (Blueprint $table) { |
64
|
|
|
$table->increments('id'); |
65
|
|
|
$table->string('name')->nullable(); |
66
|
|
|
$table->string('type')->nullable(); |
67
|
|
|
$table->integer('bot_internet_url_form_id')->nullable(); |
68
|
|
|
$table->timestamps(); |
69
|
|
|
} |
70
|
|
|
); |
71
|
|
|
} |
72
|
|
|
/** |
73
|
|
|
* Reverse the migrations. |
74
|
|
|
* |
75
|
|
|
* @return void |
76
|
|
|
*/ |
77
|
|
|
public function down() |
78
|
|
|
{ |
79
|
|
|
Schema::dropIfExists('bots'); |
80
|
|
|
} |
81
|
|
|
} |
82
|
|
|
|