diff --git a/database/migrations/2026_04_22_100000_create_postcodes_table.php b/database/migrations/2026_04_22_100000_create_postcodes_table.php new file mode 100644 index 0000000..7177ebd --- /dev/null +++ b/database/migrations/2026_04_22_100000_create_postcodes_table.php @@ -0,0 +1,23 @@ +string('postcode', 7)->primary()->comment('Normalised: uppercase, no spaces'); + $table->string('outcode', 4)->index(); + $table->decimal('lat', 10, 7); + $table->decimal('lng', 10, 7); + }); + } + + public function down(): void + { + Schema::dropIfExists('postcodes'); + } +}; diff --git a/database/migrations/2026_04_22_100001_create_outcodes_table.php b/database/migrations/2026_04_22_100001_create_outcodes_table.php new file mode 100644 index 0000000..4c5e579 --- /dev/null +++ b/database/migrations/2026_04_22_100001_create_outcodes_table.php @@ -0,0 +1,22 @@ +string('outcode', 4)->primary(); + $table->decimal('lat', 10, 7); + $table->decimal('lng', 10, 7); + }); + } + + public function down(): void + { + Schema::dropIfExists('outcodes'); + } +};