origo/scripts/db-setup.sh

13 lines
371 B
Bash
Raw Permalink Normal View History

2026-01-15 09:50:55 -05:00
#!/bin/bash
# Truncate the existing database.
rm database/origo.db
# Import the schema for the new database.
sqlite3 database/origo.db < database/schema.sql
# Check if there is a default content sql file.
if [ -f database/default-content.sql ]; then
# Import the default content for the new database.
sqlite3 database/origo.db < database/default-content.sql
fi