3 ms·
> I need to be able to add any arbitrary attribute to the user document so I can't really use a table with a schema. I'd love to see a sample of this data
by 6nf 9y ago
> I need to be able to add any arbitrary attribute to the user document so I can't really use a table with a schema.
I'd love to see a sample of this data
- deleted 9y ago[deleted]
- Kiro 9y agoIt's not your usual CRUD app. It's a realtime sandbox game in early access. Some arbitrary stuff I keep adding for various reasons: gunsLeftToCompensateDueToChangeInVersionX: 123, winnerOfEventX: true, didSomethingFunky: Date.now(), noOfEnemiesKilledBeforeVersionY: 123, inventory: [{id: GENERIC_ITEM_ID, quantity: 123}, {id: uuid, name: "Ultimate Weapon", damage: 10000, someUniqueProp: {doThis: true, uses: 123}}], flaggedForCheatingInThisOrThatArena: true Etc etc. Biggest reason though is just convenience of adding some state to the player when developing new features. Itt would be a complete pain having to add schemas for every single situation, even if it's standardised for all players. Now I just add it to the player object and it's saved automatically to the player document. Not saying what I do is best practice or anything but it enables me to move fast without having to do much DB admin stuff.