Back

[SOLVED] DATABASE MODEL (STRUCTURE)

  • 0
  • Databases
dammy
16 Jun, 2023, 09:51

ookay

TL;DR
User is discussing database structure and asking for guidance on how to update user balance without creating a new document. There is a reference to an outdated version of Appwrite in the cloud. Another user suggests using relationships and a user ID field. The original user expresses gratitude and mentions using self-hosted Appwrite in the future. There is a question about how to match a user to its various documents. The user updates the thread with an updated diagram. The conversation ends with a question about the beta end date. Solution: User is provided guidance on using relationships and a user ID field to match a user to its documents. The user expresses intent
dammy
16 Jun, 2023, 09:52

will beta end this month? I will be done by then

D5
16 Jun, 2023, 09:53

Not sure, they said by the end of ths year

D5
16 Jun, 2023, 09:53
D5
16 Jun, 2023, 09:53

Updated diagram

dammy
16 Jun, 2023, 10:58

Ouch

dammy
16 Jun, 2023, 10:58

I appreciate you dearly

I didn't do anything to deserve this

dammy
23 Jun, 2023, 07:35

hi @D5 thanks for the other day

but how do I match a user to all it's various documents?

D5
23 Jun, 2023, 08:42

Are you using cloud or self-hosted?

dammy
23 Jun, 2023, 09:18

currently using cloud @D5

dammy
23 Jun, 2023, 09:18

but will use self-hosted when am pushing to production

D5
23 Jun, 2023, 09:43

In cloud, you should manage relationships manually

D5
23 Jun, 2023, 09:44

Basically you create a userID field and you put there the user ID

dammy
23 Jun, 2023, 11:58

I just did local installation and found relationships

dammy
23 Jun, 2023, 11:59

I appreciate you @D5

D5
23 Jun, 2023, 12:11

Perfect

Drake
23 Jun, 2023, 14:23

[SOLVED] DATABASE MODEL (STRUCTURE)

dammy
23 Jun, 2023, 15:22

that means appwrite cloud is not up to date?

dammy
23 Jun, 2023, 15:22

besides, @D5 how do I store user balance in a way that after a transaction is successful, instead of having a new document which is not needed, it will update existing one?

D5
23 Jun, 2023, 15:23

Nope, cloud is using 1.1.2 and current appwrite version in 1.3.7

dammy
23 Jun, 2023, 15:24

okay then

D5
23 Jun, 2023, 15:25

You should modify it with a function, when a new transaction is made

dammy
23 Jun, 2023, 15:25

ok, thanks

D5
23 Jun, 2023, 15:25

Also when for creating a transaction you should have a function so you could update the value with the same function

dammy
23 Jun, 2023, 15:34

ok then, thanks

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