1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fixes for migrations

This commit is contained in:
David Bomba 2023-08-22 20:51:35 +10:00
parent b2a8d8dddf
commit 9900e07ad5
2 changed files with 5 additions and 7 deletions

View File

@ -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');

View File

@ -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');
});
}