-
Notifications
You must be signed in to change notification settings - Fork 6
Postgres
zelenko edited this page Feb 16, 2021
·
2 revisions
docker pull postgres
mkdir -p $HOME/docker/volumes/postgres
docker run --rm --name pg-docker -e POSTGRES_PASSWORD=******* -e TZ="America/New_York" -e PGTZ="America/New_York" -d -p 5432:5432 -v $HOME/docker/volumes/postgres/data:/var/lib/postgresql/data postgres
db, err := gorm.Open(sqlite.Open("gorm.db"), &gorm.Config{
NamingStrategy: schema.NamingStrategy{
TablePrefix: "t_",
SingularTable: true,
},
})