One-Time Setup

Firestore Data Seeder

Initialize the branches collection with seat data from the original SQL schema

Read Before Seeding
  • Creates 6 documents in Firestore with IDs: CS, EC, EE, ME, CE, AT
  • Run this only once when setting up fresh β€” it will overwrite existing branch data
  • Firestore rules must be allow read, write: if true during development
  • After seeding, use Admin β†’ Seat Allotment to manage seat counts atomically

Data to be Seeded

Branch ID Full Name Govt Donor SNQ Total
TOTAL

Run Seeder

🌱

This will create/overwrite 6 documents in the branches Firestore collection.

Alternative: Manual Firestore Setup

Go to Firebase Console β†’ Firestore β†’ Create collection branches with these documents:

// Document ID: CS β†’ government_seats:29, donor_seats:2, snq_seats:5, order:1
// Document ID: EE β†’ government_seats:57, donor_seats:2, snq_seats:5, order:2
// Document ID: ME β†’ government_seats:59, donor_seats:2, snq_seats:5, order:3
// Document ID: EC β†’ government_seats:58, donor_seats:2, snq_seats:5, order:4
// Document ID: CE β†’ government_seats:63, donor_seats:2, snq_seats:5, order:5
// Document ID: AT β†’ government_seats:54, donor_seats:2, snq_seats:5, order:6