diff --git a/database/migrations/2023_06_07_000001_create_pulse_tables.php b/database/migrations/2023_06_07_000001_create_pulse_tables.php index 5f775d79..150fa1d5 100644 --- a/database/migrations/2023_06_07_000001_create_pulse_tables.php +++ b/database/migrations/2023_06_07_000001_create_pulse_tables.php @@ -31,7 +31,8 @@ public function up(): void match ($driver = $connection->getDriverName()) { 'mysql' => $table->char('key_hash', 16)->charset('binary')->virtualAs('unhex(md5(`key`))'), 'pgsql' => $table->uuid('key_hash')->storedAs('md5("key")::uuid'), - default => App::environment('testing') ? $table->char('key_hash', 16) : throw new RuntimeException("Unsupported database driver [{$driver}]."), + 'sqlite' => App::environment('testing') ? $table->char('key_hash', 16) : throw new RuntimeException("Unsupported database driver [{$driver}].") + default => throw new RuntimeException("Unsupported database driver [{$driver}]."), }; $table->text('value'); @@ -48,7 +49,8 @@ public function up(): void match ($driver = $connection->getDriverName()) { 'mysql' => $table->char('key_hash', 16)->charset('binary')->virtualAs('unhex(md5(`key`))'), 'pgsql' => $table->uuid('key_hash')->storedAs('md5("key")::uuid'), - default => App::environment('testing') ? $table->char('key_hash', 16) : throw new RuntimeException("Unsupported database driver [{$driver}]."), + 'sqlite' => App::environment('testing') ? $table->char('key_hash', 16) : throw new RuntimeException("Unsupported database driver [{$driver}].") + default => throw new RuntimeException("Unsupported database driver [{$driver}]."), }; $table->bigInteger('value')->nullable(); @@ -67,7 +69,8 @@ public function up(): void match ($driver = $connection->getDriverName()) { 'mysql' => $table->char('key_hash', 16)->charset('binary')->virtualAs('unhex(md5(`key`))'), 'pgsql' => $table->uuid('key_hash')->storedAs('md5("key")::uuid'), - default => App::environment('testing') ? $table->char('key_hash', 16) : throw new RuntimeException("Unsupported database driver [{$driver}]."), + 'sqlite' => App::environment('testing') ? $table->char('key_hash', 16) : throw new RuntimeException("Unsupported database driver [{$driver}].") + default => throw new RuntimeException("Unsupported database driver [{$driver}]."), }; $table->string('aggregate'); $table->decimal('value', 20, 2);