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 AddDavIndexies extends Migration |
8: | { |
9: | |
10: | |
11: | |
12: | |
13: | |
14: | public function up() |
15: | { |
16: | try { |
17: | Capsule::schema()->table('adav_cards', function (Blueprint $table) { |
18: | $table->index('addressbookid', 'addressbookid_index'); |
19: | $table->index('lastmodified', 'lastmodified_index'); |
20: | $table->index('uri', 'uri_index'); |
21: | }); |
22: | } catch (\Exception $e) { |
23: | } |
24: | } |
25: | |
26: | |
27: | |
28: | |
29: | |
30: | |
31: | public function down() |
32: | { |
33: | Capsule::schema()->table('adav_cards', function (Blueprint $table) { |
34: | $table->dropIndex('addressbookid_index'); |
35: | $table->dropIndex('lastmodified_index'); |
36: | $table->dropIndex('uri_index'); |
37: | }); |
38: | } |
39: | } |
40: | |