diff --git a/migrations/2021-03-02-022949_create_game_file_table/up.sql b/migrations/2021-03-02-022949_create_game_file_table/up.sql index d98b898..0367750 100644 --- a/migrations/2021-03-02-022949_create_game_file_table/up.sql +++ b/migrations/2021-03-02-022949_create_game_file_table/up.sql @@ -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) ) \ No newline at end of file diff --git a/migrations/2021-03-02-025744_create_game_save_loc_table/up.sql b/migrations/2021-03-02-025744_create_game_save_loc_table/up.sql index 5b4d873..55ff06c 100644 --- a/migrations/2021-03-02-025744_create_game_save_loc_table/up.sql +++ b/migrations/2021-03-02-025744_create_game_save_loc_table/up.sql @@ -1,7 +1,7 @@ -- Your SQL goes here CREATE TABLE game_save_location ( id INTEGER PRIMARY KEY NOT NULL, - friendly_name TEXT, -- This can be null - original_path TEXT NOT NULL, - uuid BLOB NOT NULL + friendly_name TEXT UNIQUE, -- This can be null + original_path TEXT NOT NULL UNIQUE, + uuid BLOB NOT NULL UNIQUE ) \ No newline at end of file