34853-vm/db/migrations/001_create_serviceable_addresses.sql
2025-10-11 05:03:50 +00:00

18 lines
723 B
SQL

-- Create the table for serviceable addresses
CREATE TABLE IF NOT EXISTS `serviceable_addresses` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`street` VARCHAR(255) NOT NULL,
`suburb` VARCHAR(255) NOT NULL,
`postcode` VARCHAR(10) NOT NULL,
`state` VARCHAR(10) NOT NULL,
INDEX `idx_address` (`street`, `suburb`, `postcode`, `state`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Insert some sample data for testing
INSERT INTO `serviceable_addresses` (`street`, `suburb`, `postcode`, `state`) VALUES
('123 Fake St', 'Sydney', '2000', 'NSW'),
('456 Example Ave', 'Melbourne', '3000', 'VIC'),
('789 Sample Rd', 'Brisbane', '4000', 'QLD'),
('101 Test St', 'Perth', '6000', 'WA'),
('222 Demo Dr', 'Adelaide', '5000', 'SA');