Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function up() |
||
13 | { |
||
14 | Schema::create('block__blocks', function (Blueprint $table) { |
||
15 | $table->engine = 'InnoDB'; |
||
16 | $table->increments('id'); |
||
17 | $table->string('name'); |
||
18 | $table->timestamps(); |
||
19 | }); |
||
20 | |||
21 | Schema::create('block__blocks_translations', function (Blueprint $table) { |
||
22 | $table->engine = 'InnoDB'; |
||
23 | $table->increments('id'); |
||
24 | $table->tinyInteger('online')->nullable(); |
||
25 | $table->text('body')->nullable(); |
||
26 | |||
27 | $table->integer('block_id')->unsigned(); |
||
28 | $table->string('locale')->index(); |
||
29 | $table->unique(['block_id', 'locale']); |
||
30 | $table->foreign('block_id')->references('id')->on('block__blocks')->onDelete('cascade'); |
||
31 | }); |
||
32 | } |
||
33 | |||
44 |