GZTimeWalker/GZCTF

Epic: Multi-provider databases support

hez2010 opened this issue · 1 comments

We are going to add support for multi-provider databases.
By adding this support, users can choose their own preferred database when use GZCTF.

Database support:

  • PostgreSQL
  • SQL Server
  • MySQL
  • SQLite

By default, the database provider will be PostgreSQL.

Summary on the current progress.

We have done the initial work for the fundamental of multi-database support. But each database provider comes with its own limitation which results in the current data model which uses PostgreSQL as the baseline cannot be used directly on different databases.

Particularly,

  • SQL Server: doesn't support multiple cascades on the same foreign key, this has to be workaround with triggers.
  • MySQL: doesn't support DateTimeOffset which is basically a DateTime type with time zone information.
  • SQLite: doesn't support any type other than primitive types and DateTime.

We need further work on the data model to fit the requirements coming from all the databases and would highly possibly require breaking changes to the database schema.

Triaging this as a future work.