summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-03-24 13:13:55 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-03-24 13:13:55 (GMT)
commitcda22f99ac513582104e3adbfd145cd9afdb1064 (patch)
tree177bc5dcfaaf5bcc20d679338ddcb0bd3d4375c1 /src
parent3470468ec34fadf3c4927b7c6c1bf9509119e4fb (diff)
fixed sql init
Diffstat (limited to 'src')
-rw-r--r--src/db.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/db.lua b/src/db.lua
index d501659..ebd8caa 100644
--- a/src/db.lua
+++ b/src/db.lua
@@ -23,10 +23,6 @@ luasql = require "luasql.mysql"
-- for destination database
-- CREATE DATABASE nop CHARACTER SET utf8 COLLATE utf8_unicode_ci;
--- GRANT select,insert,update,delete ON nop.master TO 'nopsyncd'@'localhost' IDENTIFIED BY '<password>';
--- GRANT select,insert,update,delete ON nop.standby TO 'nopsyncd'@'localhost';
--- GRANT select,insert,update ON nop.state TO 'nopsysstated'@'localhost' IDENTIFIED BY '<password>';
--- GRANT select ON nop.* TO 'nop'@'localhost' IDENTIFIED BY '<password>';
-- USE nop
-- CREATE TABLE IF NOT EXISTS master (timestamp BIGINT UNSIGNED PRIMARY KEY NOT NULL, cart INT NOT NULL, len INT, showtitle VARCHAR(255), title VARCHAR(255), artist VARCHAR(255), album VARCHAR(255), ismusic BOOLEAN);
-- ALTER TABLE master CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
@@ -34,6 +30,10 @@ luasql = require "luasql.mysql"
-- ALTER TABLE standby CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
-- CREATE TABLE IF NOT EXISTS state (timestamp BIGINT UNSIGNED PRIMARY KEY NOT NULL, state VARCHAR(32));
-- ALTER TABLE state CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+-- GRANT select,insert,update,delete ON nop.master TO 'nopsyncd'@'localhost' IDENTIFIED BY '<password>';
+-- GRANT select,insert,update,delete ON nop.standby TO 'nopsyncd'@'localhost';
+-- GRANT select,insert,update ON nop.state TO 'nopsysstated'@'localhost' IDENTIFIED BY '<password>';
+-- GRANT select ON nop.* TO 'nopro'@'localhost' IDENTIFIED BY '<password>';
local db = {}