Add automatic cdclient migration runner support and setup (#789)

* Add automatic migrations for CDServer

Add support to automatically migrate and update CDServers with new migrations.  Also adds support to simplify the setup process by simply putting the fdb in the res folder and letting the server convert it to sqlite.

This reduces the amount of back and forth when setting up a server.

* Remove transaction language

* Add DML execution
`poggers`
Add a way to execute DML commands through the sqlite connection on the server.

* Make DML Commands more robust

On the off chance the server is shutdown before the whole migration is run, lets just not add it to our "finished list" until the whole file is done.

* Update README
This commit is contained in:
David Markowitz
2022-10-30 00:38:43 -07:00
committed by GitHub
parent a745cdb727
commit 906887bda9
8 changed files with 127 additions and 48 deletions

View File

@@ -1,19 +1,13 @@
#pragma once
#include "Database.h"
#include "dCommonVars.h"
#include "Game.h"
#include "dCommonVars.h"
#include "dLogger.h"
#include <string>
struct Migration {
std::string data;
std::string name;
};
class MigrationRunner {
public:
static void RunMigrations();
static Migration LoadMigration(std::string path);
namespace MigrationRunner {
void RunMigrations();
void RunSQLiteMigrations();
};