|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
use Illuminate\Support\Facades\Schema; |
|
4
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
5
|
|
|
use Illuminate\Database\Migrations\Migration; |
|
6
|
|
|
|
|
7
|
|
|
/** |
|
8
|
|
|
* Migration auto-generated by Sequel Pro Laravel Export (1.5.0) |
|
9
|
|
|
* @see https://github.com/cviebrock/sequel-pro-laravel-export |
|
10
|
|
|
*/ |
|
11
|
|
|
class CreateDatastoreTable extends Migration |
|
12
|
|
|
{ |
|
13
|
|
|
/** |
|
14
|
|
|
* Run the migrations. |
|
15
|
|
|
* |
|
16
|
|
|
* @return void |
|
17
|
|
|
*/ |
|
18
|
|
|
public function up() |
|
19
|
|
|
{ |
|
20
|
|
|
Schema::create('datastore', function (Blueprint $table) { |
|
21
|
|
|
$table->bigIncrements('id'); |
|
22
|
|
|
$table->string('type', 255)->nullable(); |
|
23
|
|
|
$table->string('namespace', 255)->nullable(); |
|
24
|
|
|
$table->string('module', 255); |
|
25
|
|
|
$table->string('name', 255)->nullable(); |
|
26
|
|
|
$table->string('key', 255)->nullable(); |
|
27
|
|
|
$table->unsignedTinyInteger('private')->nullable()->default(0); |
|
28
|
|
|
$table->longText('value')->nullable(); |
|
29
|
|
|
$table->string('options', 255)->nullable(); |
|
30
|
|
|
$table->string('meta', 255)->nullable(); |
|
31
|
|
|
$table->string('accept', 255)->nullable()->comment('comma separated list of assets it accepts as related'); |
|
32
|
|
|
$table->string('accept_limit', 255)->nullable(); |
|
33
|
|
|
$table->unsignedBigInteger('datastore_id')->nullable(); |
|
34
|
|
|
$table->string('shortname', 255)->nullable(); |
|
35
|
|
|
$table->string('children', 255)->nullable(); |
|
36
|
|
|
$table->unsignedTinyInteger('is_child')->nullable(); |
|
37
|
|
|
$table->string('status', 255)->nullable(); |
|
38
|
|
|
$table->string('embedded', 255)->nullable(); |
|
39
|
|
|
$table->string('theme', 50)->nullable(); |
|
40
|
|
|
$table->text('meta_description')->nullable(); |
|
41
|
|
|
$table->text('meta_keywords')->nullable(); |
|
42
|
|
|
$table->text('page_css')->nullable(); |
|
43
|
|
|
$table->text('page_js')->nullable(); |
|
44
|
|
|
$table->string('limit', 20)->nullable(); |
|
45
|
|
|
$table->string('warning', 20)->nullable(); |
|
46
|
|
|
$table->string('callback', 255)->nullable(); |
|
47
|
|
|
$table->unsignedTinyInteger('required')->nullable(); |
|
48
|
|
|
$table->string('comment_equals', 255)->nullable(); |
|
49
|
|
|
$table->integer('max_instances')->nullable()->default(0); |
|
50
|
|
|
$table->date('start_date')->nullable(); |
|
51
|
|
|
$table->date('end_date')->nullable(); |
|
52
|
|
|
$table->string('lang', 255)->nullable(); |
|
53
|
|
|
$table->timestamps(); |
|
54
|
|
|
|
|
55
|
|
|
|
|
56
|
|
|
|
|
57
|
|
|
|
|
58
|
|
|
$table->index('datastore_id', 'index_foreignkey_datastore'); |
|
59
|
|
|
|
|
60
|
|
|
$table->foreign('datastore_id', 'datastore_ibfk_1')->references('id')->on('datastore')->onDelete('CASCADE')->onUpdate('RESTRICT'); |
|
61
|
|
|
|
|
62
|
|
|
}); |
|
63
|
|
|
|
|
64
|
|
|
|
|
65
|
|
|
|
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* Reverse the migrations. |
|
70
|
|
|
* |
|
71
|
|
|
* @return void |
|
72
|
|
|
*/ |
|
73
|
|
|
public function down() |
|
74
|
|
|
{ |
|
75
|
|
|
Schema::dropIfExists('datastore'); |
|
76
|
|
|
} |
|
77
|
|
|
} |
|
78
|
|
|
|