mirror of
https://github.com/alexjustesen/speedtest-tracker.git
synced 2026-06-23 07:20:09 +00:00
Hotfix v0.16.1 (#1156)
This commit is contained in:
@@ -17,29 +17,31 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
if (Schema::hasTable('results')) {
|
||||
/**
|
||||
* Rename the existing table so that a backup copy exists.
|
||||
*/
|
||||
Schema::rename('results', 'results_bad_json');
|
||||
}
|
||||
if (! Schema::hasTable('results') && ! Schema::hasTable('results_bad_json')) {
|
||||
if (Schema::hasTable('results')) {
|
||||
/**
|
||||
* Rename the existing table so that a backup copy exists.
|
||||
*/
|
||||
Schema::rename('results', 'results_bad_json');
|
||||
}
|
||||
|
||||
if (! Schema::hasTable('results')) {
|
||||
/**
|
||||
* Create a new results table based on a new DDL schema.
|
||||
*/
|
||||
Schema::create('results', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('service')->default('ookla');
|
||||
$table->float('ping', 8, 3)->nullable();
|
||||
$table->unsignedBigInteger('download')->nullable();
|
||||
$table->unsignedBigInteger('upload')->nullable();
|
||||
$table->text('comments')->nullable();
|
||||
$table->json('data')->nullable();
|
||||
$table->string('status');
|
||||
$table->boolean('scheduled')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
if (! Schema::hasTable('results')) {
|
||||
/**
|
||||
* Create a new results table based on a new DDL schema.
|
||||
*/
|
||||
Schema::create('results', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('service')->default('ookla');
|
||||
$table->float('ping', 8, 3)->nullable();
|
||||
$table->unsignedBigInteger('download')->nullable();
|
||||
$table->unsignedBigInteger('upload')->nullable();
|
||||
$table->text('comments')->nullable();
|
||||
$table->json('data')->nullable();
|
||||
$table->string('status');
|
||||
$table->boolean('scheduled')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user