GZCTF icon indicating copy to clipboard operation
GZCTF copied to clipboard

Epic: Multi-provider databases support

Open hez2010 opened this issue 1 year ago • 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.

hez2010 avatar Apr 02 '24 07:04 hez2010

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.

hez2010 avatar Apr 24 '24 08:04 hez2010