Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function up() |
||
14 | { |
||
15 | Schema::create('articles', function($table) |
||
16 | { |
||
17 | $table->engine = 'InnoDB'; |
||
18 | $table->bigIncrements('id'); |
||
19 | $table->string('nickname',50); |
||
20 | $table->string('scope',50); |
||
21 | $table->string('lang',10); |
||
22 | $table->longtext('content'); |
||
23 | $table->boolean('activated')->default(0); |
||
24 | $table->bigInteger('user_id')->unsigned()->nullable(); |
||
25 | $table->timestamps(); |
||
26 | $table->unique(array('nickname','lang','scope')); |
||
27 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); |
||
28 | }); |
||
42 |