Add experimental DATabaseTwo and update 64-bit

DATabaseTwo is a standalone version of what will be replacing "Import" and "Generate" and thus eliminating the need for a complex import and export process. Custom DATs can be cared by Dir2DAT features and merging so there is no use to have advanced DB features. The new database, dats..sqlite, is a much lighter version, only holding the DAT information, systems, and sources.
This commit is contained in:
Matt Nadareski
2016-05-05 10:13:57 -07:00
parent 9daad48f50
commit 4e3e3f950c
21 changed files with 1174 additions and 56 deletions

View File

@@ -161,6 +161,46 @@ CREATE TABLE IF NOT EXISTS gamesource (
'game' TEXT NOT NULL,
'sourceid' INTEGER NOT NULL,
PRIMARY KEY (game, sourceid)
)";
slc = new SqliteCommand(query, dbc);
slc.ExecuteNonQuery();
}
else if (type == "dats")
{
string query = @"
CREATE TABLE IF NOT EXISTS dats (
'id' INTEGER PRIMARY KEY NOT NULL,
'size' INTEGER NOT NULL DEFAULT -1,
'sha1' TEXT NOT NULL,
'name' TEXT NOT NULL
)";
SqliteCommand slc = new SqliteCommand(query, dbc);
slc.ExecuteNonQuery();
query = @"
CREATE TABLE IF NOT EXISTS datsdata (
'id' INTEGER NOT NULL,
'key' TEXT NOT NULL,
'value' TEXT,
PRIMARY KEY (id, key, value)
)";
slc = new SqliteCommand(query, dbc);
slc.ExecuteNonQuery();
query = @"
CREATE TABLE IF NOT EXISTS source (
'id' INTEGER PRIMARY KEY NOT NULL,
'name' TEXT NOT NULL UNIQUE,
'url' TEXT NOT NULL
)";
slc = new SqliteCommand(query, dbc);
slc.ExecuteNonQuery();
query = @"
CREATE TABLE IF NOT EXISTS system (
'id' INTEGER PRIMARY KEY NOT NULL,
'manufacturer' TEXT NOT NULL,
'name' TEXT NOT NULL
)";
slc = new SqliteCommand(query, dbc);
slc.ExecuteNonQuery();