mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user