Migrate to PostgreSQL, update SQL scripts and connection initialization
Modernized preferences files