From cffbce4b3bc5ef817c4063a74f148a2a5986d58a Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 13 Jan 2017 09:26:52 +0500 Subject: Initial manager implementation --- setup/default.xml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'setup') diff --git a/setup/default.xml b/setup/default.xml index 9f15e2f4b..eab11e10e 100644 --- a/setup/default.xml +++ b/setup/default.xml @@ -64,14 +64,15 @@ - INSERT INTO users (name, email, hashedPassword, salt, admin, map, distanceUnit, speedUnit, latitude, longitude, zoom, twelveHourFormat, coordinateFormat, disabled, expirationTime, deviceLimit, token, attributes) - VALUES (:name, :email, :hashedPassword, :salt, :admin, :map, :distanceUnit, :speedUnit, :latitude, :longitude, :zoom, :twelveHourFormat, :coordinateFormat, :disabled, :expirationTime, :deviceLimit, :token, :attributes) + INSERT INTO users (name, email, hashedPassword, salt, readonly, admin, map, distanceUnit, speedUnit, latitude, longitude, zoom, twelveHourFormat, coordinateFormat, disabled, expirationTime, deviceLimit, userLimit, token, attributes) + VALUES (:name, :email, :hashedPassword, :salt, :readonly, :admin, :map, :distanceUnit, :speedUnit, :latitude, :longitude, :zoom, :twelveHourFormat, :coordinateFormat, :disabled, :expirationTime, :deviceLimit, :userLimit, :token, :attributes) UPDATE users SET name = :name, email = :email, + readonly = :readonly, admin = :admin, map = :map, distanceUnit = :distanceUnit, @@ -84,6 +85,7 @@ disabled = :disabled, expirationTime = :expirationTime, deviceLimit = :deviceLimit, + userLimit = :userLimit, token = :token, attributes = :attributes WHERE id = :id @@ -349,6 +351,18 @@ DELETE FROM user_calendar WHERE userId = :userId AND calendarId = :calendarId + + + SELECT userId, otherUserId FROM user_user + + + + INSERT INTO user_user (userId, otherUserId) VALUES (:userId, :otherUserId) + + + + DELETE FROM user_user WHERE userId = :userId AND otherUserId = :otherUserId + -- cgit v1.2.3