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 databaseUsing the same name and credentials as the default UniTime database: createuser --interactive --pwprompt -U postgres createdb timetable -U timetable -O timetable 3A. Create database schema and populate it with the initial content (Variant A)Use Documentation/Database/PostgreSQL/timetable.sql to create the database schema and populate it with initial data. psql -U timetable <timetable.sql 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: Execute pgloader: pgloader -v 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): default-authentication-plugin=mysql_native_password B) Update timetable user password to mysql_native_password (using mysql -uroot -p): alter user timetable@localhost identified with mysql_native_password by 'unitime'; Once done, run the followings SQLs (using psql -U timetable) 4. Update UniTime connection propertiesIn the UniTime custom properties (see UniTime Installation, section Customization), replace MySQL connection properties with the following: |