| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function up() |
||
| 16 | { |
||
| 17 | Schema::create('leaderboards', function(Blueprint $table) { |
||
| 18 | $table->increments('id'); |
||
| 19 | |||
| 20 | $table->integer('game_id')->unsigned(); |
||
| 21 | $table->tinyInteger('timescope')->unsigned()->default('0'); // 0 - all time, 1 - daily, 2 - weekly, 3 - monthly |
||
| 22 | $table->boolean('sum_score')->default(false); // sum score on each report, if set to false then only highscore_rank will be available |
||
| 23 | |||
| 24 | $table->timestamps(); |
||
| 25 | |||
| 26 | $table->foreign('game_id')->references('id')->on('games')->onDelete('cascade'); |
||
| 27 | }); |
||
| 40 | } |