0

I'm starting to work with flutter and firestore in a simple sales application, for which I need to have a field that increments by one each time a new record is generated, something like an autoincrement in mysql or other relational databases Is there a way to do this in firestore?

FeRcHo
  • 1,119
  • 5
  • 14
  • 27
  • Nothing is built in to Firestore for such sequential fields, as they're an antipattern for scalability, but it is possible to build it yourself (with the same impact on scalability). This has been covered a few times before, so I recommend checking out: https://www.google.com/search?q=site:stackoverflow.com+firestore+autoincrement – Frank van Puffelen Dec 09 '22 at 15:21

0 Answers0