-- profiles
DROP TABLE IF EXISTS profiles;
CREATE TABLE profiles (
 id INTEGER PRIMARY KEY AUTOINCREMENT,
 name TEXT NOT NULL,
 rank_points INTEGER DEFAULT(0),
 id_rank INTEGER REFERENCES ranks(id),
 id_scenario INTEGER REFERENCES scenarios(id),
 serialized TEXT,
 live_key TEXT,
 last_session INTEGER 
);
-- progress
DROP TABLE IF EXISTS progress;
CREATE TABLE progress (
 id_profile INTEGER REFERENCES profiles(id),
 id_scenario INTEGER REFERENCES scenarios(id),
 max_score INTEGER,
 is_completed INTEGER,
 is_trophy INTEGER,
 serialized TEXT,
 UNIQUE(id_profile, id_scenario)
);




 


