SQLite is good for a single-file database solution; it won't scale well for our needs since we'll be having multiple webscrapers working at once and we'll need this database to be hosted on some URL somewhere. PostgreSQL is another SQL-based database solution that handles concurrency and scales better than SQLite. We were using SQLAlchemy as a database abstraction layer which allows us to write SQLAlchemy code without having to worry about the underlying implementation (e.g. SQLite, PostgreSQL, etc.).
TODO
[x] Check out backend/app/database/database.py for the migration entry point and some additional information
[x] Install the database driver for PostgreSQL by adding psycopg2==2.9.8 to the requirements.txt file and running pip3 install -r requirements.txt
Context
SQLite is good for a single-file database solution; it won't scale well for our needs since we'll be having multiple webscrapers working at once and we'll need this database to be hosted on some URL somewhere. PostgreSQL is another SQL-based database solution that handles concurrency and scales better than SQLite. We were using SQLAlchemy as a database abstraction layer which allows us to write SQLAlchemy code without having to worry about the underlying implementation (e.g. SQLite, PostgreSQL, etc.).
TODO
backend/app/database/database.py
for the migration entry point and some additional informationpsycopg2==2.9.8
to therequirements.txt
file and runningpip3 install -r requirements.txt
Notes
You don't need to set up a remote PostgreSQL instance. A local one will work for now.