Back

Need help with creating database schema

  • 0
  • Databases
  • Web
Pradip Chaudhary
20 Apr, 2023, 04:41

I want a new database to be created when a new user is created and I should be able to get the database ID when user logs in and then only that user should be able to perform operations on that database. But I'm facing issue with linking the new database with user Any idea how to do it?

TL;DR
User wants to create a new database when a new user is created and link it to that user. They are facing issues with linking the new database with the user. A possible solution could be to use a login function that triggers the event of providing the document ID, which can be stored as a global variable or in any other secure way.
joeyouss
20 Apr, 2023, 09:33

Hi - what issue are you facing?

joeyouss
20 Apr, 2023, 09:35

I opine, you can create a function of creating documents triggered only when a new user (signup ) is done

upon login -> login function can trigger the event of giving you document ID - which you can maybe choose to be a global variable ? (not safe) but in any other way

https://appwrite.io/docs/databases#create-documents

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more