1: | <?php |
2: | |
3: | use Illuminate\Database\Migrations\Migration; |
4: | use Illuminate\Database\Schema\Blueprint; |
5: | use Illuminate\Database\Capsule\Manager as Capsule; |
6: | |
7: | class CreateUsersTable extends Migration |
8: | { |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | public function up() |
15: | { |
16: | Capsule::schema()->create('core_users', function (Blueprint $table) { |
17: | $table->increments('Id'); |
18: | $table->string('UUID'); |
19: | $table->string('Name')->default(''); |
20: | $table->string('PublicId')->unique(); |
21: | $table->integer('IdTenant')->default(0); |
22: | $table->boolean('IsDisabled')->default(false); |
23: | $table->integer('IdSubscription')->default(0); |
24: | $table->integer('Role')->default(\Aurora\System\Enums\UserRole::NormalUser); |
25: | |
26: | $table->datetime('DateCreated')->nullable(); |
27: | $table->datetime('LastLogin')->nullable(); |
28: | $table->string('LastLoginNow')->default(''); |
29: | $table->integer('LoginsCount')->default(0); |
30: | |
31: | $table->string('Language')->default(''); |
32: | |
33: | $table->integer('TimeFormat')->nullable()->default(1); |
34: | $table->string('DateFormat')->default(''); |
35: | |
36: | $table->string('Question1')->default(''); |
37: | $table->string('Question2')->default(''); |
38: | $table->string('Answer1')->default(''); |
39: | $table->string('Answer2')->default(''); |
40: | |
41: | $table->boolean('SipEnable')->default(true); |
42: | $table->string('SipImpi')->default(''); |
43: | $table->string('SipPassword')->default(''); |
44: | |
45: | $table->boolean('DesktopNotifications')->default(false); |
46: | |
47: | $table->string('Capa')->default(''); |
48: | $table->string('CustomFields')->default(''); |
49: | |
50: | $table->boolean('FilesEnable')->default(true); |
51: | |
52: | $table->string('EmailNotification')->default(''); |
53: | |
54: | $table->string('PasswordResetHash')->default(''); |
55: | |
56: | $table->boolean('WriteSeparateLog')->default(false); |
57: | |
58: | $table->integer('TokensValidFromTimestamp')->default(0); |
59: | |
60: | $table->string('DefaultTimeZone')->default(''); |
61: | |
62: | $table->json('Properties')->nullable(); |
63: | |
64: | $table->timestamp(\Aurora\System\Classes\Model::CREATED_AT)->nullable(); |
65: | $table->timestamp(\Aurora\System\Classes\Model::UPDATED_AT)->nullable(); |
66: | }); |
67: | } |
68: | |
69: | |
70: | |
71: | |
72: | |
73: | |
74: | public function down() |
75: | { |
76: | Capsule::schema()->dropIfExists('core_users'); |
77: | } |
78: | } |
79: | |