Commit 793dfe7
feat: automatically track lastUpdated time on all firestore docs (#227)
- it is often helpful to query for “new” firestore docs (for sync or backup)
- this commit adds an automatic server timestamp to all subject documents and top level project documents when updated or created so that this can be queried
- non-breaking change because without this it just will not store those fields.
- update tests for last updated
- update default rules to allow anonymous updates to last updated for parent/project doc
- [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>1 parent d705dc3 commit 793dfe7
3 files changed
Lines changed: 33 additions & 6 deletions
File tree
- firebase
- src/core/stores
- tests/vitest/core/stores
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
151 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
152 | 157 | | |
153 | 158 | | |
154 | 159 | | |
| |||
167 | 172 | | |
168 | 173 | | |
169 | 174 | | |
170 | | - | |
171 | | - | |
172 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
173 | 186 | | |
174 | 187 | | |
175 | 188 | | |
| |||
232 | 245 | | |
233 | 246 | | |
234 | 247 | | |
| 248 | + | |
235 | 249 | | |
236 | 250 | | |
237 | 251 | | |
| |||
242 | 256 | | |
243 | 257 | | |
244 | 258 | | |
| 259 | + | |
245 | 260 | | |
246 | 261 | | |
247 | 262 | | |
248 | 263 | | |
249 | 264 | | |
| 265 | + | |
250 | 266 | | |
251 | 267 | | |
252 | 268 | | |
| |||
277 | 293 | | |
278 | 294 | | |
279 | 295 | | |
| 296 | + | |
280 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
281 | 303 | | |
282 | 304 | | |
283 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
71 | 72 | | |
72 | | - | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
0 commit comments