update db schema
This commit is contained in:
@@ -16,10 +16,10 @@ LOANS = """CREATE TABLE IF NOT EXISTS loans (
|
|||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
user_id INTEGER NOT NULL,
|
user_id INTEGER NOT NULL,
|
||||||
media_id INTEGER NOT NULL,
|
media_id INTEGER NOT NULL,
|
||||||
loan_date DATETIME NOT NULL,
|
loan_date TEXT NOT NULL,
|
||||||
return_date DATETIME NOT NULL,
|
return_date TEXT NOT NULL,
|
||||||
returned INTEGER DEFAULT 0,
|
returned INTEGER DEFAULT 0,
|
||||||
returned_date DATETIME,
|
returned_date TEXT,
|
||||||
FOREIGN KEY (user_id) REFERENCES users(id),
|
FOREIGN KEY (user_id) REFERENCES users(id),
|
||||||
FOREIGN KEY (media_id) REFERENCES media(id));
|
FOREIGN KEY (media_id) REFERENCES media(id));
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user