mirror of
https://github.com/kaythomas0/noisedash.git
synced 2025-11-15 04:38:00 +00:00
Add profiles table
This commit is contained in:
@@ -2,6 +2,32 @@ const db = require('../db')
|
|||||||
|
|
||||||
module.exports = function () {
|
module.exports = function () {
|
||||||
db.serialize(function () {
|
db.serialize(function () {
|
||||||
db.run('CREATE TABLE IF NOT EXISTS users ( username TEXT UNIQUE, hashed_password BLOB, salt BLOB, name TEXT)')
|
db.run(`CREATE TABLE IF NOT EXISTS users (
|
||||||
|
id INTEGER PRIMARY KEY,
|
||||||
|
username TEXT UNIQUE,
|
||||||
|
hashed_password BLOB,
|
||||||
|
salt BLOB,
|
||||||
|
name TEXT)`
|
||||||
|
)
|
||||||
|
|
||||||
|
db.run(`CREATE TABLE IF NOT EXISTS profiles (
|
||||||
|
name TEXT UNIQUE,
|
||||||
|
timer_enabled INTEGER,
|
||||||
|
timer_seconds INTEGER,
|
||||||
|
volume INTEGER,
|
||||||
|
noise_color TEXT,
|
||||||
|
filter_enabled INTEGER,
|
||||||
|
filter_type TEXT,
|
||||||
|
filter_cutoff INTEGER,
|
||||||
|
filter_cutoff_lfo_enabled INTEGER,
|
||||||
|
filter_cutoff_lfo_rate REAL,
|
||||||
|
filter_cutoff_lfo_min INTEGER,
|
||||||
|
filter_cutoff_lfo_max INTEGER,
|
||||||
|
tremolo_enabled INTEGER,
|
||||||
|
tremolo_frequency REAL,
|
||||||
|
tremolo_depth REAL,
|
||||||
|
user INTEGER,
|
||||||
|
FOREIGN KEY(user) REFERENCES user(id))`
|
||||||
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user