This document explains how UniTime can be used with PostgreSQL. You can either create a new database (follow step 3A and skip 3B) or migrate an existing MySQL database (follow step 3B instead of 3A).
Install PostgreSQL 12.0 (e.g., from https://www.postgresql.org/download/), using the default port 5432, and a custom password.
Download the JDBC Driver (e.g., from https://jdbc.postgresql.org/download.html,) and place it under Tomcat/lib.
If migrating from an existing MySQL database, install pgloader. See https://github.com/dimitri/pgloader for instructions.
UniTime needs to be updated to version 4.4.139 or later.
2. Create timetable user and timetable database
Using the same name and credentials as the default UniTime database:
Note: The timetable database will contain the woebegon-example data as the online demo. You can delete the two example sessions once a new session is created (the status needs to be changed to Session Finished first), using the Administration > Academic Sessions > Academic Sessions page.
3B. Migrate an existing MySQL database (Variant B)
Create configuration file, e.g., migration.cfg:
Note: If you get the MYSQL-UNSUPPORTED-AUTHENTICATION error, make the following changes:
A) Edit my.cnf and in [mysqld] section add the following line (restart MySQL afterward):
B) Update timetable user password to mysql_native_password (using mysql -uroot -p):
Once done, run the followings SQLs (using psql -U timetable)
Start UniTime, check the logs for any errors.