can one integrate supertokens with an existing database? For instance, Im running a prisma client connected to a postgresql db, which has a schema for users. I would love if I could connect supertokens and my db somehow. For more context, Im using prisma to expose a graphql api, which I would like the auth to be used on
r
rp_st
04/30/2023, 5:49 PM
hey @zebleck you can do this - just provide your current db's connection uri to the core, and the core will create and manage supertokens related tables in the same db.
That being said, these tables will be unrelated to the prisma schema for your app, and you should keep it that way.
z
zebleck
04/30/2023, 5:51 PM
Thanks for the quick response! That means however that users will be stored seperately from the one in my prisma schema and I will have to implement some kind of synchronization scheme I suppose
r
rp_st
04/30/2023, 5:51 PM
yes.
rp_st
04/30/2023, 5:52 PM
i mean you could add our db schema to your prisma schema as well.
rp_st
04/30/2023, 5:52 PM
and when you start the core, it will just use those already created tables.