-- Schema for addresses table CREATE TABLE IF NOT EXISTS `addresses` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL COMMENT 'Descriptive Name for this address', `address` text NOT NULL COMMENT 'street or unit number and street name', `city` varchar(255) NOT NULL COMMENT 'Suburb / City', `state_id` int(11) NOT NULL COMMENT 'State foreign Key', `country_id` int(11) NOT NULL COMMENT 'Country foreign Key', `customer_id` int(11) NOT NULL COMMENT 'Customer foreign key', `type` varchar(255) NOT NULL COMMENT 'either bill / ship / both', `postcode` varchar(50) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;