| Total Complexity | 2 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class CreateHouseAdsTable extends Migration |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Run the migrations. |
||
| 11 | * |
||
| 12 | * @return void |
||
| 13 | */ |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('house_ads', function(Blueprint $table) { |
||
| 17 | $table->id(); |
||
| 18 | |||
| 19 | $table->integer('game_id')->unsigned(); |
||
| 20 | $table->string('media_portrait', 128)->nullable(); |
||
| 21 | $table->string('media_landscape', 128)->nullable(); |
||
| 22 | $table->boolean('open_url')->default(true); |
||
| 23 | $table->string('url_ios', 256)->nullable(); |
||
| 24 | $table->string('url_android', 256)->nullable(); |
||
| 25 | $table->tinyInteger('repeat_count')->unsigned()->default('1'); |
||
| 26 | $table->tinyInteger('priority')->unsigned()->default('1'); |
||
| 27 | $table->date('start_at'); |
||
| 28 | $table->date('end_at'); |
||
| 29 | $table->mediumInteger('shown_count')->unsigned()->default('0'); |
||
| 30 | $table->mediumInteger('confirmed_count')->unsigned()->default('0'); |
||
| 31 | $table->mediumInteger('cancelled_count')->unsigned()->default('0'); |
||
| 32 | |||
| 33 | $table->timestamps(); |
||
| 34 | |||
| 35 | $table->foreign('game_id')->references('id')->on('games')->onDelete('cascade'); |
||
| 36 | }); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Reverse the migrations. |
||
| 41 | * |
||
| 42 | * @return void |
||
| 43 | */ |
||
| 44 | public function down() |
||
| 47 | } |
||
| 48 | } |
||
| 49 |