| Total Complexity | 2 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class CreateMediaTable extends Migration |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Run the migrations. |
||
| 11 | * |
||
| 12 | * @return void |
||
| 13 | */ |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('media', function (Blueprint $table) { |
||
| 17 | $table->increments('id'); |
||
| 18 | $table->string('stored_name'); |
||
| 19 | $table->string('file_name'); |
||
| 20 | $table->string('extension', 5); |
||
| 21 | $table->string('caption')->nullable(); |
||
| 22 | $table->string('mime', 30); |
||
| 23 | $table->integer('size'); |
||
| 24 | $table->integer('width')->nullable(); |
||
| 25 | $table->integer('height')->nullable(); |
||
| 26 | $table->integer('mediumable_id')->nullable(); |
||
| 27 | $table->string('mediumable_type')->nullable(); |
||
| 28 | $table->tinyInteger('position')->nullable(); |
||
| 29 | $table->string('manner')->nullable(); |
||
| 30 | $table->integer('comments_count')->default(0); |
||
| 31 | $table->integer('likes_count')->default(0); |
||
| 32 | $table->string('description')->nullable(); |
||
| 33 | $table->timestamps(); |
||
| 34 | }); |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Reverse the migrations. |
||
| 39 | * |
||
| 40 | * @return void |
||
| 41 | */ |
||
| 42 | public function down() |
||
| 45 | } |
||
| 46 | } |
||
| 47 |