Update and fix broadband traffic

This commit is contained in:
Deon George
2022-04-20 16:24:58 +10:00
parent 621a132e35
commit 16b7e0b493
13 changed files with 161 additions and 112 deletions

View File

@@ -266,6 +266,8 @@ class RenameServiceTables extends Migration
DB::statement('ALTER TABLE service_broadband MODIFY service_id int unsigned NOT NULL');
DB::statement('ALTER TABLE service_broadband MODIFY service_stats_collect tinyint(1) DEFAULT NULL');
DB::statement('ALTER TABLE service_broadband RENAME COLUMN service_stats_lastupdate TO service_stats_at');
DB::statement('ALTER TABLE service_broadband RENAME COLUMN provided_adsl_plan_id TO provided_supplier_broadband_id');
DB::statement('ALTER TABLE service_broadband MODIFY provided_supplier_broadband_id int unsigned DEFAULT NULL');
// @todo drop column provided_adsl_plan_id
Schema::table('service_broadband', function (Blueprint $table) {
@@ -281,6 +283,7 @@ class RenameServiceTables extends Migration
$table->dropIndex('ab_service__adsl_id_site_id_index');
$table->foreign(['service_id','site_id'])->references(['id','site_id'])->on('services');
$table->foreign(['provided_supplier_broadband_id','site_id'])->references(['id','site_id'])->on('supplier_broadband');
});
// Convert our dates