diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-07-10 16:57:09 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-07-10 16:57:09 -0300 |
| commit | 8dbd1d39e3dbd1276e2351070a0645c5e973da9e (patch) | |
| tree | f70eaa92e3e7def84bbf27b2b1550b23767541a6 /sql/README.txt | |
| download | querymanager-8dbd1d39e3dbd1276e2351070a0645c5e973da9e.tar.gz querymanager-8dbd1d39e3dbd1276e2351070a0645c5e973da9e.zip | |
bare bones query manager
This is a bare bones query manager that will respond just enough
queries to get the server running. The overall structure of the
tables should be almost set but we'd need to handle all queries to
get the server running properly.
It uses the SQLite3 3.50.2 amalgamation for a database backend so
we can completely avoid having to spin up yet another service for a
separate database system, effectively turning the query manager into
the database itself. This also means that other services such as the
login server and website must go through it to access the data but
it shouldn't be too difficult to replicate the querying mechanism
from the server.
This design choice was made with a single game server in mind. The
networking protocol is NOT encrypted at all and won't accept remote
connections. For a fully multi-world distributed infrastructure, a
distributed database system like PostgreSQL and MySQL should be
considered.
Diffstat (limited to 'sql/README.txt')
| -rw-r--r-- | sql/README.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/README.txt b/sql/README.txt new file mode 100644 index 0000000..26f782a --- /dev/null +++ b/sql/README.txt @@ -0,0 +1,10 @@ + The query manager will properly initialize and upgrade the database schema +based on files in this folder. The initial schema should be in `schema.sql` and +upgrades should be in `upgrade-N.sql` where N is a number starting from 1. The +`upgrade-N.sql` file should take the database from version N to N + 1. + The only restriction to these files is that they can't have transaction +statements ("BEGIN", "ROLLBACK", "COMMIT") because the query manager will +already bundle them into a transaction that also sets `user_version`, and +and nested transactions aren't allowed. + The current database version can be retrieved with the "PRAGMA user_version" +query in the SQLite shell.
\ No newline at end of file |
