# 08. Implement Linux database layer (SQLite)

meta:
  id: native-business-logic-migration-08
  feature: native-business-logic-migration
  priority: P0
  depends_on: [native-business-logic-migration-05]
  tags: [implementation, linux, database]

objective:
- Implement database layer using SQLite for Linux

deliverables:
- database.vala
- subscription-store.vala
- feed-item-store.vala
- search-history-store.vala
- schema.sql
- Database migrations
- FTS virtual table implementation

tests:
- Unit: Test CRUD operations
- Unit: Test relationships
- Unit: Test FTS queries
- Integration: Test database migrations

acceptance_criteria:
- SQLite database configured
- All tables created
- FTS search working
- Migrations implemented
- Proper error handling

validation:
- Run `meson test -C build`
- Verify with sqlite3 CLI

notes:
- Use GLib's GDatabase or direct SQLite bindings
- Implement FTS using SQLite FTS5
- Use transactions for batch operations
