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 CreateMinHashesTable extends Migration
8: {
9: /**
10: * Run the migrations.
11: *
12: * @return void
13: */
14: public function up()
15: {
16: Capsule::schema()->create('core_min_hashes', function (Blueprint $table) {
17: $table->increments('Id');
18: $table->string('HashId', 32)->default('');
19: $table->bigInteger('UserId')->nullable();
20: $table->string('Hash', 20)->default('');
21: $table->text('Data');
22: $table->integer('ExpireDate')->default(0)->nullable();
23: $table->timestamp(\Aurora\System\Classes\Model::CREATED_AT)->nullable();
24: $table->timestamp(\Aurora\System\Classes\Model::UPDATED_AT)->nullable();
25: $table->index('Hash', 'min_hash_index');
26: });
27: }
28:
29: /**
30: * Reverse the migrations.
31: *
32: * @return void
33: */
34: public function down()
35: {
36: Capsule::schema()->dropIfExists('core_min_hashes');
37: }
38: }
39: