update to use sqlalchemy

- change from mysql-connector-python to sqlalchemy
    - allow for connection to sqlite3, mysql, mariadb, postgres, and
oracle databases
- change `DATE` columns to `DATETIME` type
- add WHO columns
- install database connectors and required packages
This commit is contained in:
ksyasuda
2024-09-06 02:14:12 -07:00
parent 497320c082
commit 1c0eb91333
8 changed files with 85 additions and 115 deletions

View File

@@ -1,12 +1,11 @@
LISTEN_ADDRESS=0.0.0.0 # Lisen on all interfaces
LISTEN_PORT=8080 # Internal port number
MPV_SOCKET=/tmp/mpvsocket # Path to mpv socket
# MySQL connection info
MYSQL_HOST=localhost
MYSQL_USER=mpvuser
MYSQL_PASSWORD=SecretPassword
MYSQL_DATABASE=mpv
MYSQL_PORT=3306
LOGLEVEL=info
# Options:
# mysql+pymysql://<user>:<password>@<host>[:<port>]/<dbname> - works with MySQL and Mariadb
# postgresql+psycopg2://user:password@host:port/dbname[?key=value&key=value...]
# sqlite:///path
# oracle+oracledb://user:pass@hostname:port[/dbname][?service_name=<service>[&key=value&key=value...]]
DATABASE_URL=mysql+pymysql://user:password@localhost:3306/mpv