File: history.sql

package info (click to toggle)
pgloader 3.6.10-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,060 kB
  • sloc: sql: 32,321; lisp: 14,793; makefile: 435; sh: 85; python: 26
file content (21 lines) | stat: -rw-r--r-- 675 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CREATE TABLE `history` (
  `hotel_id` varchar(16) NOT NULL,
  `update_type` varchar(255) NOT NULL,
  `code` varchar(255) DEFAULT NULL,
  `affected_from` date DEFAULT NULL,
  `affected_to` date DEFAULT NULL,
  `submit_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `submit_ip` varchar(15) DEFAULT NULL,
  `submit_user` varchar(255) DEFAULT NULL,
  `id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


ALTER TABLE `history`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD KEY `update_type` (`update_type`),
  ADD KEY `hotel_id` (`hotel_id`);

ALTER TABLE `history`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;