Advertisement
Guest User

Untitled

a guest
Feb 10th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.29 KB | None | 0 0
  1. CREATE TABLE `branch` (
  2.     `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  3.     `bank_id` INT(10) UNSIGNED NOT NULL,
  4.     `city_id` BIGINT(20) UNSIGNED NOT NULL,
  5.     `slug` VARCHAR(255) NOT NULL,
  6.     `name` VARCHAR(512) NOT NULL,
  7.     `location` VARCHAR(512) NULL DEFAULT NULL,
  8.     `postal_code` VARCHAR(10) NULL DEFAULT NULL,
  9.     `phone` VARCHAR(512) NULL DEFAULT NULL,
  10.     `seo_title` TEXT NOT NULL,
  11.     `seo_description` TEXT NOT NULL,
  12.     `branch_deposit` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
  13.     `established` DATE NULL DEFAULT NULL,
  14.     `working_hours` TINYTEXT NULL,
  15.     `is_published` BIT(1) NOT NULL DEFAULT b'0',
  16.     `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  17.     `updated_at` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  18.     PRIMARY KEY (`id`),
  19.     INDEX `location_bank_fk_idx` (`bank_id`),
  20.     INDEX `location_city_fk_idx` (`city_id`),
  21.     INDEX `branch_deposit` (`branch_deposit`),
  22.     INDEX `index_slug` (`slug`) USING HASH,
  23.     INDEX `name_idx` (`name`) USING BTREE,
  24.     FULLTEXT INDEX `postal_code` (`postal_code`),
  25.     CONSTRAINT `location_bank_fk` FOREIGN KEY (`bank_id`) REFERENCES `bank` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,
  26.     CONSTRAINT `location_city_fk` FOREIGN KEY (`city_id`) REFERENCES `city` (`id`) ON UPDATE NO ACTION ON DELETE NO ACTION
  27. )
  28. COLLATE='utf8_general_ci'
  29. ENGINE=InnoDB
  30. AUTO_INCREMENT=163980
  31. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement