Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function up() |
||
13 | { |
||
14 | Schema::create('users', function (Blueprint $table) { |
||
15 | //primary |
||
16 | $table->unsignedInteger('user_id'); |
||
17 | $table->unsignedInteger('organization_id'); |
||
18 | $table->primary(['user_id', 'organization_id']); |
||
19 | //related user |
||
20 | $table->unsignedInteger('referred_by_user_id')->nullable(); |
||
21 | $table->unsignedInteger('referred_by_organization_id')->nullable(); |
||
22 | $table->string('name')->unique(); |
||
23 | $table->unsignedInteger('counter')->default(0); |
||
24 | $table->timestamps(); |
||
25 | }); |
||
36 |