feat: add weekly_pump_prices migration for BEIS fuel price data
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (8.3) (push) Has been cancelled
tests / ci (8.4) (push) Has been cancelled
tests / ci (8.5) (push) Has been cancelled

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.
This commit is contained in:
Ovidiu U
2026-05-01 13:22:50 +01:00
parent 73de53994f
commit e821a934a5

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('weekly_pump_prices', function (Blueprint $table) {
$table->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');
}
};