-
Notifications
You must be signed in to change notification settings - Fork 925
Closed
Labels
📚 cockroach💻 darwin🔧 golangbugSomething isn't workingSomething isn't workinginvalidThis doesn't seem rightThis doesn't seem right
Description
Version
1.14.0
What happened?
Wanted to create a new enum only IF NOT EXISTS
.
This might not be supported in postgres (dunno), but is supported in cockroachdb https://www.cockroachlabs.com/docs/v22.1/create-type and its a very nice feature for having an easy migration.
Relevant log output
schema.sql:1:1: syntax error at or near "NOT"
Database schema
CREATE TYPE IF NOT EXISTS community_role AS ENUM ('creator', 'admin');
SQL queries
No response
Configuration
version: "2"
sql:
- schema: "schema.sql"
queries: "queries.sql"
engine: "postgresql"
gen:
go:
package: "nakama"
out: "."
output_models_file_name: "models_gen.go"
output_db_file_name: "db_gen.go"
output_files_suffix: "_gen.go"
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
Metadata
Metadata
Assignees
Labels
📚 cockroach💻 darwin🔧 golangbugSomething isn't workingSomething isn't workinginvalidThis doesn't seem rightThis doesn't seem right