mirror of
https://github.com/kaythomas0/noisedash.git
synced 2025-11-13 11:56:20 +00:00
Add db serialize functions
This commit is contained in:
@@ -35,8 +35,17 @@ module.exports = function () {
|
||||
db.run(`CREATE TABLE IF NOT EXISTS samples (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT UNIQUE,
|
||||
volume INTEGER,
|
||||
user INTEGER,
|
||||
FOREIGN KEY(user) REFERENCES users(id))`
|
||||
)
|
||||
|
||||
db.run(`CREATE TABLE IF NOT EXISTS profiles_samples (
|
||||
id INTEGER PRIMARY KEY,
|
||||
profile INTEGER,
|
||||
sample INTEGER,
|
||||
FOREIGN KEY(profile) REFERENCES profiles(id),
|
||||
FOREIGN KEY(sample) REFERENCES samples(id))`
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user