add postgre sql

This commit is contained in:
yedf2 2021-07-31 11:36:30 +08:00
parent b1edaf8e7f
commit 998daf5f8c
4 changed files with 10 additions and 1 deletions

9
compose.postgres.yml Normal file
View File

@ -0,0 +1,9 @@
version: '3.3'
services:
postgres:
image: 'daocloud.io/library/postgres'
environment:
POSTGRES_PASSWORD: mysecretpassword
ports:
- '5432:5432'

View File

View File

@ -38,7 +38,7 @@ CREATE TABLE IF NOT EXISTS dtm.trans_branch (
`create_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `gid` (`gid`,`branch_id`, `branch_type`),
UNIQUE KEY `gid_uniq` (`gid`,`branch_id`, `branch_type`),
KEY `create_time` (`create_time`),
KEY `update_time` (`update_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

View File