Skip to content

Instantly share code, notes, and snippets.

@chiyanun
Last active July 9, 2022 06:05
Show Gist options
  • Save chiyanun/643084fa6e745a35317f452d6a849b14 to your computer and use it in GitHub Desktop.
Save chiyanun/643084fa6e745a35317f452d6a849b14 to your computer and use it in GitHub Desktop.
Mysql Demo
docker run --name mysqldb -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 -d mysql

TicketDetail Tables

สร้าง table ticketDetailTable โดยมี column ดังนี้

column type
id varchar(32) pk
ticketId varchar(32) fk -> tickerTables
detail vachar(512)
attachment json
createdAt DateTime default CURRENT_TIMESTAMP
updatedAt Datetime default CURRENT_TIMESTAMP
create table opertaion_tickets.ticketTables
(
id varchar(32) not null
primary key,
title varchar(256) not null,
createdAt datetime default CURRENT_TIMESTAMP null,
updatedAt datetime default CURRENT_TIMESTAMP null
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment