You've already forked testing-go-code-with-postgres
mirror of
https://github.com/xorcare/testing-go-code-with-postgres.git
synced 2025-06-30 23:23:40 +02:00
Fix placeholder for the database template name
When a template database name contains invalid characters such as `-`, the request to create a new database stops working. To reduce this behavior, quotation marks have been added.
This commit is contained in:
@ -75,7 +75,7 @@ func (p *Postgres) cloneFromReference() *Postgres {
|
||||
newDatabaseName := uuid.New().String()
|
||||
|
||||
sql := fmt.Sprintf(
|
||||
`CREATE DATABASE %q WITH TEMPLATE %s;`,
|
||||
`CREATE DATABASE %q WITH TEMPLATE %q;`,
|
||||
newDatabaseName,
|
||||
p.ref,
|
||||
)
|
||||
|
Reference in New Issue
Block a user