diff --git a/src/database/migrations/2020_12_14_113555_add_addressable_index.php b/src/database/migrations/2020_12_14_113555_add_addressable_index.php new file mode 100644 index 0000000..e2d44e6 --- /dev/null +++ b/src/database/migrations/2020_12_14_113555_add_addressable_index.php @@ -0,0 +1,32 @@ +index(['addressable_type', 'addressable_id']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('addresses', function (Blueprint $table) { + $table->dropIndex(['addressable_type', 'addressable_id']); + }); + } +}