Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE `branch` (
- `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- `bank_id` INT(10) UNSIGNED NOT NULL,
- `city_id` BIGINT(20) UNSIGNED NOT NULL,
- `slug` VARCHAR(255) NOT NULL,
- `name` VARCHAR(512) NOT NULL,
- `location` VARCHAR(512) NULL DEFAULT NULL,
- `postal_code` VARCHAR(10) NULL DEFAULT NULL,
- `phone` VARCHAR(512) NULL DEFAULT NULL,
- `seo_title` TEXT NOT NULL,
- `seo_description` TEXT NOT NULL,
- `branch_deposit` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
- `established` DATE NULL DEFAULT NULL,
- `working_hours` TINYTEXT NULL,
- `is_published` BIT(1) NOT NULL DEFAULT b'0',
- `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
- `updated_at` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`),
- INDEX `location_bank_fk_idx` (`bank_id`),
- INDEX `location_city_fk_idx` (`city_id`),
- INDEX `branch_deposit` (`branch_deposit`),
- INDEX `index_slug` (`slug`) USING HASH,
- INDEX `name_idx` (`name`) USING BTREE,
- FULLTEXT INDEX `postal_code` (`postal_code`),
- CONSTRAINT `location_bank_fk` FOREIGN KEY (`bank_id`) REFERENCES `bank` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,
- CONSTRAINT `location_city_fk` FOREIGN KEY (`city_id`) REFERENCES `city` (`id`) ON UPDATE NO ACTION ON DELETE NO ACTION
- )
- COLLATE='utf8_general_ci'
- ENGINE=InnoDB
- AUTO_INCREMENT=163980
- ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement