Database Test Setup
This project includes two Ruby scripts used to initialize and populate a SQLite database (whoknows.db) for testing.
init_db.rb
- Creates the database schema.
- Drops and recreates the
userstable. - Inserts a default admin user.
- Creates the
pagestable with fields: title(primary key)urllanguage(enorda)last_updatedcontent
init_pages.rb
- Clears all existing data in the
pagestable. - Inserts a small set of test pages.
- Uses
INSERT OR REPLACEto avoid duplicates. - Prints confirmation of inserted records.
Usage
Run the scripts in order:
```bash ruby init_db.rb ruby init_pages.rb