diff --git a/database/migrations/2014_10_13_000000_create_users_table.php b/database/migrations/2014_10_13_000000_create_users_table.php index bf25b3891e35..56cacf472175 100644 --- a/database/migrations/2014_10_13_000000_create_users_table.php +++ b/database/migrations/2014_10_13_000000_create_users_table.php @@ -22,8 +22,8 @@ return new class extends Migration { */ public function up() { - DB::raw('SET GLOBAL innodb_file_per_table=1;'); - DB::raw('SET GLOBAL innodb_file_format=Barracuda;'); + DB::raw('SET GLOBAL innodb_file_per_table=1;')->getValue(DB::connection()->getQueryGrammar()); + DB::raw('SET GLOBAL innodb_file_format=Barracuda;')->getValue(DB::connection()->getQueryGrammar()); Schema::create('languages', function ($table) { $table->increments('id'); diff --git a/database/migrations/2022_10_05_205645_add_indexes_to_client_hash.php b/database/migrations/2022_10_05_205645_add_indexes_to_client_hash.php index ff3cef56bb1c..d38f4a8b92d3 100644 --- a/database/migrations/2022_10_05_205645_add_indexes_to_client_hash.php +++ b/database/migrations/2022_10_05_205645_add_indexes_to_client_hash.php @@ -12,18 +12,16 @@ return new class extends Migration { */ public function up() { - Schema::table('clients', function (Blueprint $table) { - $table->index([\DB::raw('client_hash(20)')]); - }); + \DB::statement('CREATE INDEX client_hash_idx ON clients (client_hash(20));'); + \DB::statement('CREATE INDEX client_contact_key_idx ON client_contacts (contact_key(20));'); + \DB::statement('CREATE INDEX vendor_contact_key_idx ON vendor_contacts (contact_key(20));'); Schema::table('client_contacts', function (Blueprint $table) { - $table->index([\DB::raw('contact_key(20)')]); $table->index('email'); }); Schema::table('vendor_contacts', function (Blueprint $table) { - $table->index([\DB::raw('contact_key(20)')]); $table->index('email'); }); }