#Schema of postgres
1 messages · Page 1 of 1 (latest)
Hi @pseudo hull may I ask for clarification regarding your mention of the 'schema of PostgreSQL'? If you’re referring to the schema (authorization model), you can set it using the writeAPI: https://docs.permify.co/docs/api-overview/schema/write-schema
If you’re referring to something related to PostgreSQL database configuration, I would need more details about your request.
thanks for your reply 🙂
I'm trying to use the "github.com/Permify/permify-gorm" if I am not wrong about getting library
func TableName() string {
return database.SchemaName() + ".advertisements"
}
This is part of my golang code for model to set the table name and schema name, currently I don't use the public schema which is generally provided from the postgres. when initializing the permify, I can see some errors on console due to the non existing schemas
Error:
ERROR: no schema has been selected to create in at character 14
STATEMENT: CREATE TABLE "roles" ("id" bigserial,"name" varchar(255) NOT NULL,"guard_name" varchar(255) NOT NULL,"description" varchar(255),"created_at" timestamptz,"updated_at" timestamptz,PRIMARY KEY ("id"))
I've made it works after configurating the gorm with setting schema, thanks for your support