Skip to content

Latest commit

 

History

History

schema

SQL SChema

Using ent

Add Schema

# add `User` and `Pet` table
go run -mod=mod entgo.io/ent/cmd/ent init User Pet

Generate Scripts

go generate ./ent

Export SQL

# start local mysql server
docker compose up -d

# export
go run ./scripts/main.go export