feat(db): Ensure no duplicate data in the DB

This commit is contained in:
2021-03-02 21:39:16 -06:00
parent a0357b3ee3
commit bf2336386e
2 changed files with 5 additions and 5 deletions

View File

@@ -1,8 +1,8 @@
-- Your SQL goes here
CREATE TABLE game_file (
id INTEGER PRIMARY KEY NOT NULL,
original_path TEXT NOT NULL, -- TEXT assumes a Unicode Encoding
file_hash BLOB NOT NULL,
original_path TEXT NOT NULL UNIQUE, -- TEXT assumes a Unicode Encoding
file_hash BLOB NOT NULL UNIQUE,
game_save_id INTEGER NOT NULL,
FOREIGN KEY (game_save_id) REFERENCES game_save_location (id)
)