https://www.ory.sh/ logo
#talk-kratos
Title
# talk-kratos
a

adorable-byte-96872

02/16/2022, 7:48 AM
how are people here handling seperation of kratos tables from their other app tables? I have microservices with each service "owning" a schema, but I can't spot any way to define the schema for kratos migrate. I'd rather not use the public schema, and using a separate database would mean we cant use the identity ID as a foreign key anywhere
s

steep-lamp-91158

02/16/2022, 9:01 AM
You can pass it by path in the DSN URI usually like e.g.
<postgres://admin:admin@127.0.0.1/kratos>
a

adorable-byte-96872

02/16/2022, 9:31 AM
i think only database is available (at least for postgres) via uri
s

steep-lamp-91158

02/16/2022, 2:45 PM
ah you want the same database but different schemas? not sure how that works
but the option you have is to change the DSN
a

adorable-byte-96872

02/17/2022, 11:37 AM
Yeah. It seems its not supported by kratos. For prisma you add ?schema=xxx to the end and it works but kratos errors with "unknown configuration parameter"
s

steep-lamp-91158

02/17/2022, 12:10 PM
We use
pgx
as a driver, so this might work: https://github.com/jackc/pgx/issues/1013
4 Views