CruCentralCoast / CruiOS

iOS mobile app for Cru Central Coast. NOTE: The app has been decommissioned and this repo has been archived
1 stars 2 forks source link

Update Firebase Firestore field and collection names #223

Closed tydahlwave closed 5 years ago

tydahlwave commented 5 years ago

Firestore is our cloud database on Firebase. Some of the collections are improperly named. Likewise, some of the fields within specific collections ought to be renamed.

COLLECTIONS:

FIELDS:

fedorareis commented 5 years ago

Technically this should be in the Firebase repos issues, but it will require app updates after. I was about to sit down and work on this for a bit.

fedorareis commented 5 years ago

For Community Group I am fine with all of the changes except type. The reason we named it type and not year was because not every movement does their community groups by year.

We should have done the collection rename before the 2.0 release. In order to make sure the app works even if people don't update we will need to copy the full collection to the new collection name until there aren't any users on an old version.

tydahlwave commented 5 years ago

Now that the 2.0 release is postponed again, perhaps I can get this fixed beforehand. Also, I still don't like the "type" keyword. It is very confusing. I feel like most community groups / bible studies are based on age or year. If the community group spans multiple years, it can be considered "mixed" instead of a specific year in school.

fedorareis commented 5 years ago

mixed makes sense. I would also like to get created and updated fields added to everything. They would be timestamps and would be helpful for doing data cleanup/management

tydahlwave commented 5 years ago

Hmm... adding created and updated fields is easier said than done. I wonder if there is a way within Firebase to automatically populate the updated field each time data is changed? I can look into the feasibility of adding it into the app as well

tydahlwave commented 5 years ago

Looks like the answer is yes: https://firebase.google.com/docs/functions/firestore-events