| Conditions | 1 |
| Paths | 1 |
| Total Lines | 30 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function up() |
||
| 14 | { |
||
| 15 | Schema::create( |
||
| 16 | 'changes', function ($table) { |
||
| 17 | $table->engine = 'InnoDB'; |
||
| 18 | $table->increments('id'); |
||
| 19 | |||
| 20 | $table->string('model'); |
||
| 21 | $table->string('key'); |
||
| 22 | $table->string('action'); |
||
| 23 | $table->string('title')->nullable(); |
||
| 24 | $table->longText('changed')->nullable(); |
||
| 25 | |||
| 26 | $table->longText('meta')->nullable(); |
||
| 27 | $table->boolean('deleted')->nullable(); |
||
| 28 | $table->timestamps(); |
||
| 29 | |||
| 30 | $table->index(['model', 'key']); |
||
| 31 | $table->index(['key', 'model']); |
||
| 32 | $table->index(['action', 'created_at']); |
||
| 33 | $table->index(['created_at', 'action']); |
||
| 34 | $table->index(['deleted', 'created_at']); |
||
| 35 | |||
| 36 | $table->integer('changeable_id')->nullable(); |
||
| 37 | $table->string('changeable_type', 255)->nullable(); |
||
| 38 | // $table->foreign('admin_id')->references('id')->on('admins')->onUpdate('cascade')->onDelete('cascade'); |
||
| 39 | // $table->integer('admin_id')->unsigned(); |
||
| 40 | } |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | |||
| 54 |