1: | <?php |
2: | |
3: | use Illuminate\Database\Capsule\Manager as Capsule; |
4: | use Illuminate\Database\Migrations\Migration; |
5: | use Illuminate\Database\Schema\Blueprint; |
6: | |
7: | class CreateActivityHistoryTable extends Migration |
8: | { |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | public function up() |
15: | { |
16: | Capsule::schema()->create('core_activity_history', function (Blueprint $table) { |
17: | $table->id('Id'); |
18: | $table->integer('UserId')->default(0); |
19: | $table->string('ResourceType')->default(''); |
20: | $table->string('ResourceId')->default(''); |
21: | $table->string('IpAddress')->default(); |
22: | $table->string('Action')->default(''); |
23: | $table->integer('Timestamp')->default(0); |
24: | $table->string('GuestPublicId')->default(''); |
25: | |
26: | $table->timestamp(\Aurora\System\Classes\Model::CREATED_AT)->nullable(); |
27: | $table->timestamp(\Aurora\System\Classes\Model::UPDATED_AT)->nullable(); |
28: | }); |
29: | } |
30: | |
31: | |
32: | |
33: | |
34: | |
35: | |
36: | public function down() |
37: | { |
38: | Capsule::schema()->dropIfExists('core_activity_history'); |
39: | } |
40: | } |
41: | |