CREATE TABLE si_regions (
	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	name VARCHAR(255) NOT NULL UNIQUE
) ENGINE=InnoDB;

ALTER TABLE si_inspections ADD COLUMN region_id INT DEFAULT NULL;
ALTER TABLE si_inspections ADD KEY idx_region_id (region_id);
ALTER TABLE si_inspections ADD FOREIGN KEY fk_region (region_id) REFERENCES si_regions (id);

CREATE TABLE si_sections (
	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	name VARCHAR(255) NOT NULL UNIQUE
) ENGINE=InnoDB;

ALTER TABLE si_inspections ADD COLUMN section_id INT DEFAULT NULL;
ALTER TABLE si_inspections ADD KEY idx_section_id (section_id);
ALTER TABLE si_inspections ADD FOREIGN KEY fk_section (section_id) REFERENCES si_sections (id);