@@ -12,18 +12,18 @@ |
||
| 12 | 12 | public function up() { |
| 13 | 13 | Schema::create('files', function(Blueprint $table) { |
| 14 | 14 | $table->increments('id'); |
| 15 | - $table->string('filepath')->collation('utf8_bin'); |
|
| 16 | - $table->string('filename'); |
|
| 17 | - $table->datetime('created_at'); |
|
| 18 | - $table->integer('created_by')->nullable(); |
|
| 15 | + $table->string('filepath')->collation('utf8_bin'); |
|
| 16 | + $table->string('filename'); |
|
| 17 | + $table->datetime('created_at'); |
|
| 18 | + $table->integer('created_by')->nullable(); |
|
| 19 | 19 | }); |
| 20 | 20 | |
| 21 | 21 | Schema::create('files_usage', function(Blueprint $table) { |
| 22 | 22 | $table->integer('file_id')->unsigned()->index(); |
| 23 | - $table->string('used_type')->index(); |
|
| 24 | - $table->string('used_id')->index(); |
|
| 25 | - $table->datetime('created_at'); |
|
| 26 | - $table->integer('created_by')->nullable(); |
|
| 23 | + $table->string('used_type')->index(); |
|
| 24 | + $table->string('used_id')->index(); |
|
| 25 | + $table->datetime('created_at'); |
|
| 26 | + $table->integer('created_by')->nullable(); |
|
| 27 | 27 | |
| 28 | 28 | $table->foreign('file_id')->references('id')->on('files')->onDelete('cascade'); |
| 29 | 29 | }); |