From e821a934a5e4d7b2fb2adc8fff212901c1cf4297 Mon Sep 17 00:00:00 2001 From: Ovidiu U Date: Fri, 1 May 2026 13:22:50 +0100 Subject: [PATCH] feat: add weekly_pump_prices migration for BEIS fuel price data Created migration for storing UK weekly pump prices from BEIS publications. Table uses Monday date as primary key and stores petrol/diesel pump prices, duty, and VAT rates as integer pence or percentage values. --- ...112248_create_weekly_pump_prices_table.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 database/migrations/2026_05_01_112248_create_weekly_pump_prices_table.php diff --git a/database/migrations/2026_05_01_112248_create_weekly_pump_prices_table.php b/database/migrations/2026_05_01_112248_create_weekly_pump_prices_table.php new file mode 100644 index 0000000..578aa4c --- /dev/null +++ b/database/migrations/2026_05_01_112248_create_weekly_pump_prices_table.php @@ -0,0 +1,32 @@ +date('date')->primary()->comment('Week starting (Monday) per BEIS publication'); + $table->unsignedSmallInteger('ulsp_pence')->comment('Petrol pump price × 100'); + $table->unsignedSmallInteger('ulsd_pence')->comment('Diesel pump price × 100'); + $table->unsignedSmallInteger('ulsp_duty_pence')->comment('Petrol duty × 100'); + $table->unsignedSmallInteger('ulsd_duty_pence')->comment('Diesel duty × 100'); + $table->unsignedTinyInteger('ulsp_vat_pct')->comment('VAT %'); + $table->unsignedTinyInteger('ulsd_vat_pct')->comment('VAT %'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('weekly_pump_prices'); + } +};