| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | |||
| 17 | Schema::create('counters', function (Blueprint $table) { |
||
| 18 | $table->id(); |
||
| 19 | $table->string('key')->unique(); |
||
| 20 | $table->string('name'); |
||
| 21 | $table->double('initial_value')->default('0'); |
||
| 22 | $table->double('value')->default('0'); |
||
| 23 | $table->double('step')->default('1'); |
||
| 24 | $table->text('notes')->nullable(); |
||
| 25 | $table->timestamps(); |
||
| 26 | }); |
||
| 27 | |||
| 28 | Schema::create('counterables', function (Blueprint $table) { |
||
| 29 | $table->id(); |
||
| 30 | $table->morphs('counterable'); |
||
| 31 | $table->unsignedBigInteger('counter_id'); |
||
| 32 | $table->double('value')->default('0'); |
||
| 33 | $table->timestamps(); |
||
| 34 | }); |
||
| 48 |