core: Store session state in database, migrate old
authorJanne Koschinski <janne@kuschku.de>
Sat, 3 Mar 2018 07:45:31 +0000 (08:45 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 23 May 2018 22:33:28 +0000 (00:33 +0200)
commit436cb365db846985ef5ce508cb5bf925cd903480
treea94623038942ef15d271585c130ca121372caed5
parentb9169a652a6854b3fa85aee8f833cb9e18a8d510
core: Store session state in database, migrate old

Store core session state in database rather than configuration file.
This improves containerization as the configuration file doesn't need
to be preserved, and also makes database restoration handle restoring
active sessions.

Migrate existing legacy sessions to database storage, ensuring that
the core state fallback is handled correctly, too.

Part of GH-341.
21 files changed:
src/core/SQL/PostgreSQL/insert_core_state.sql [new file with mode: 0644]
src/core/SQL/PostgreSQL/migrate_write_corestate.sql [new file with mode: 0644]
src/core/SQL/PostgreSQL/select_core_state.sql [new file with mode: 0644]
src/core/SQL/PostgreSQL/setup_150_corestate.sql [new file with mode: 0644]
src/core/SQL/PostgreSQL/update_core_state.sql [new file with mode: 0644]
src/core/SQL/PostgreSQL/version/28/upgrade_000_create_corestate.sql [new file with mode: 0644]
src/core/SQL/SQLite/insert_core_state.sql [new file with mode: 0644]
src/core/SQL/SQLite/migrate_read_corestate.sql [new file with mode: 0644]
src/core/SQL/SQLite/select_core_state.sql [new file with mode: 0644]
src/core/SQL/SQLite/setup_160_corestate.sql [new file with mode: 0644]
src/core/SQL/SQLite/update_core_state.sql [new file with mode: 0644]
src/core/SQL/SQLite/version/30/upgrade_000_create_corestate.sql [new file with mode: 0644]
src/core/abstractsqlstorage.cpp
src/core/abstractsqlstorage.h
src/core/core.cpp
src/core/postgresqlstorage.cpp
src/core/postgresqlstorage.h
src/core/sql.qrc
src/core/sqlitestorage.cpp
src/core/sqlitestorage.h
src/core/storage.h