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 UpdateMailIndexes extends Migration
8: {
9: /**
10: * Run the migrations.
11: *
12: * @return void
13: */
14: public function up()
15: {
16: Capsule::schema()->table('mail_refresh_folders', function (Blueprint $table) {
17: $table->index('IdAccount');
18: });
19: Capsule::schema()->table('mail_servers', function (Blueprint $table) {
20: $table->index('TenantId');
21: });
22: Capsule::schema()->table('mail_system_folders', function (Blueprint $table) {
23: $table->index('IdAccount');
24: });
25: Capsule::schema()->table('mail_trusted_senders', function (Blueprint $table) {
26: $table->index('IdUser');
27: });
28: }
29:
30: /**
31: * Reverse the migrations.
32: *
33: * @return void
34: */
35: public function down()
36: {
37: Capsule::schema()->table('mail_refresh_folders', function (Blueprint $table) {
38: $table->dropIndex(['IdAccount']);
39: });
40: Capsule::schema()->table('mail_servers', function (Blueprint $table) {
41: $table->dropIndex(['TenantId']);
42: });
43: Capsule::schema()->table('mail_system_folders', function (Blueprint $table) {
44: $table->dropIndex(['IdAccount']);
45: });
46: Capsule::schema()->table('mail_trusted_senders', function (Blueprint $table) {
47: $table->dropIndex(['IdUser']);
48: });
49: }
50: }
51: