You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
415 B
21 lines
415 B
#pragma once
|
|
|
|
#include <db/db.h>
|
|
#include <map>
|
|
#include <db/migrations/Migration.h>
|
|
|
|
namespace db {
|
|
class Schema {
|
|
public:
|
|
Schema(sql::Database* db);
|
|
void run_migrations();
|
|
|
|
private:
|
|
uint32_t get_user_version() const;
|
|
void set_user_version(uint32_t user_version);
|
|
void assemble_migrations();
|
|
|
|
sql::Database* m_db;
|
|
std::map<uint32_t, db::migrations::Migration*> migrations;
|
|
};
|
|
}
|