| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | if (Schema::hasTable('profiles')) return; |
||
| 17 | |||
| 18 | Schema::create('profiles', function (Blueprint $table) { |
||
| 19 | $table->increments('id'); |
||
| 20 | $table->integer('user_id')->unsigned()->index(); |
||
| 21 | $table->string('age', 3)->nullable(); |
||
| 22 | $table->string('location', 35)->nullable(); |
||
| 23 | $table->text('bio')->nullable(); |
||
| 24 | $table->timestamps(); |
||
| 25 | |||
| 26 | $table->foreign('user_id') |
||
| 27 | ->references('id') |
||
| 28 | ->on('users') |
||
| 29 | ->onDelete('cascade') |
||
| 30 | ->onUpdate('cascade'); |
||
| 31 | }); |
||
| 44 |