Skip to content

Commit fb55f74

Browse files
feat(db): remove auto-seeding for clean slate on first boot
End users now start with an empty database instead of pre-populated sample restaurants. The seed_database() method remains available for development and testing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent bc160c5 commit fb55f74

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

src-tauri/src/db.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl Database {
3232
}
3333

3434
pub fn with_connection(conn: Connection) -> Result<Self> {
35-
Self::with_connection_internal(conn, true)
35+
Self::with_connection_internal(conn, false)
3636
}
3737

3838
fn with_connection_internal(conn: Connection, should_seed: bool) -> Result<Self> {
@@ -267,10 +267,19 @@ mod tests {
267267
use super::*;
268268

269269
#[test]
270-
fn test_seed_database_on_first_launch() {
270+
fn test_database_starts_empty() {
271+
let db = Database::in_memory().unwrap();
272+
273+
// Verify database starts with no restaurants (clean slate for end users)
274+
let restaurants = db.list_all().unwrap();
275+
assert_eq!(restaurants.len(), 0, "Database should start empty for end users");
276+
}
277+
278+
#[test]
279+
fn test_seed_database_loads_csv_data() {
271280
let db = Database::in_memory().unwrap();
272281

273-
// Explicitly seed the database
282+
// Explicitly seed the database (dev-only operation)
274283
db.seed_database().unwrap();
275284

276285
// Verify restaurants were seeded

0 commit comments

Comments
 (0)