diff options
Diffstat (limited to 'setup/default.xml')
-rw-r--r-- | setup/default.xml | 406 |
1 files changed, 1 insertions, 405 deletions
diff --git a/setup/default.xml b/setup/default.xml index f0f9ef4a3..ea8c32fbd 100644 --- a/setup/default.xml +++ b/setup/default.xml @@ -29,163 +29,16 @@ <entry key='database.ignoreUnknown'>true</entry> <entry key='database.changelog'>./schema/changelog-master.xml</entry> - - <entry key='database.selectServers'> - SELECT * FROM server - </entry> - - <entry key='database.updateServer'> - UPDATE server SET - registration = :registration, - readonly = :readonly, - deviceReadonly = :deviceReadonly, - map = :map, - bingKey = :bingKey, - mapUrl = :mapUrl, - distanceUnit = :distanceUnit, - speedUnit = :speedUnit, - latitude = :latitude, - longitude = :longitude, - zoom = :zoom, - twelveHourFormat = :twelveHourFormat, - coordinateFormat = :coordinateFormat, - forceSettings = :forceSettings, - timezone = :timezone, - attributes = :attributes - WHERE id = :id - </entry> - + <entry key='database.loginUser'> SELECT * FROM users WHERE email = :email </entry> - <entry key='database.selectUsers'> - SELECT * FROM users - </entry> - - <entry key='database.insertUser'> - INSERT INTO users (name, email, phone, hashedPassword, salt, readonly, admin, map, distanceUnit, speedUnit, latitude, longitude, zoom, twelveHourFormat, coordinateFormat, disabled, expirationTime, deviceLimit, userLimit, deviceReadonly, token, timezone, attributes) - VALUES (:name, :email, :phone, :hashedPassword, :salt, :readonly, :admin, :map, :distanceUnit, :speedUnit, :latitude, :longitude, :zoom, :twelveHourFormat, :coordinateFormat, :disabled, :expirationTime, :deviceLimit, :userLimit, :deviceReadonly, :token, :timezone, :attributes) - </entry> - - <entry key='database.updateUser'> - UPDATE users SET - name = :name, - email = :email, - phone = :phone, - readonly = :readonly, - admin = :admin, - map = :map, - distanceUnit = :distanceUnit, - speedUnit = :speedUnit, - latitude = :latitude, - longitude = :longitude, - zoom = :zoom, - twelveHourFormat = :twelveHourFormat, - coordinateFormat = :coordinateFormat, - disabled = :disabled, - expirationTime = :expirationTime, - deviceLimit = :deviceLimit, - userLimit = :userLimit, - deviceReadonly = :deviceReadonly, - token = :token, - timezone = :timezone, - attributes = :attributes - WHERE id = :id - </entry> - - <entry key='database.updateUserPassword'> - UPDATE users SET hashedPassword = :hashedPassword, salt = :salt WHERE id = :id - </entry> - - <entry key='database.deleteUser'> - DELETE FROM users WHERE id = :id - </entry> - - <entry key='database.selectUserDevices'> - SELECT userId, deviceId FROM user_device - </entry> - - <entry key='database.selectUserGroups'> - SELECT userId, groupId FROM user_group - </entry> - - <entry key='database.selectDevices'> - SELECT * FROM devices - </entry> - - <entry key='database.insertDevice'> - INSERT INTO devices (name, uniqueId, groupId, attributes, phone, model, contact, category) - VALUES (:name, :uniqueId, :groupId, :attributes, :phone, :model, :contact, :category) - </entry> - - <entry key='database.updateDevice'> - UPDATE devices SET - name = :name, - uniqueId = :uniqueId, - groupId = :groupId, - attributes = :attributes, - phone = :phone, - model = :model, - contact = :contact, - category = :category - WHERE id = :id - </entry> - - <entry key='database.updateDeviceStatus'> - UPDATE devices SET lastUpdate = :lastUpdate WHERE id = :id - </entry> - - <entry key='database.deleteDevice'> - DELETE FROM devices WHERE id = :id - </entry> - - <entry key='database.linkUserDevice'> - INSERT INTO user_device (userId, deviceId) VALUES (:userId, :deviceId) - </entry> - - <entry key='database.unlinkUserDevice'> - DELETE FROM user_device WHERE userId = :userId AND deviceId = :deviceId - </entry> - - <entry key='database.selectGroups'> - SELECT * FROM groups - </entry> - - <entry key='database.insertGroup'> - INSERT INTO groups (name, groupId, attributes) VALUES (:name, :groupId, :attributes) - </entry> - - <entry key='database.updateGroup'> - UPDATE groups SET name = :name, groupId = :groupId, attributes = :attributes WHERE id = :id - </entry> - - <entry key='database.deleteGroup'> - DELETE FROM groups WHERE id = :id - </entry> - - <entry key='database.linkUserGroup'> - INSERT INTO user_group (userId, groupId) VALUES (:userId, :groupId) - </entry> - - <entry key='database.unlinkUserGroup'> - DELETE FROM user_group WHERE userId = :userId AND groupId = :groupId - </entry> - <entry key='database.selectPositions'> SELECT * FROM positions WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to ORDER BY fixTime </entry> - <entry key='database.selectPosition'> - SELECT * FROM positions WHERE id = :id - </entry> - - <entry key='database.insertPosition'> - INSERT INTO positions (deviceId, protocol, serverTime, deviceTime, fixTime, valid, latitude, longitude, altitude, speed, course, address, attributes, accuracy, network) - VALUES (:deviceId, :protocol, :now, :deviceTime, :fixTime, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :attributes, :accuracy, :network) - </entry> - <entry key='database.selectLatestPositions'> SELECT positions.* FROM positions INNER JOIN devices ON positions.id = devices.positionid; </entry> @@ -194,102 +47,10 @@ UPDATE devices SET positionId = :id WHERE id = :deviceId </entry> - <entry key='database.selectEvent'> - SELECT * FROM events WHERE id = :id - </entry> - - <entry key='database.insertEvent'> - INSERT INTO events (type, serverTime, deviceId, positionId, geofenceId, attributes) - VALUES (:type, :serverTime, :deviceId, :positionId, :geofenceId, :attributes) - </entry> - <entry key='database.selectEvents'> SELECT * FROM events WHERE deviceId = :deviceId AND serverTime BETWEEN :from AND :to ORDER BY serverTime </entry> - <entry key='database.selectGeofences'> - SELECT * FROM geofences - </entry> - - <entry key='database.insertGeofence'> - INSERT INTO geofences (name, description, calendarid, area, attributes) - VALUES (:name, :description, :calendarid, :area, :attributes) - </entry> - - <entry key='database.updateGeofence'> - UPDATE geofences SET - name = :name, - description = :description, - calendarid = :calendarid, - area = :area, - attributes = :attributes - WHERE id = :id - </entry> - - <entry key='database.deleteGeofence'> - DELETE FROM geofences WHERE id = :id - </entry> - - <entry key='database.selectUserGeofences'> - SELECT userId, geofenceId FROM user_geofence - </entry> - - <entry key='database.linkUserGeofence'> - INSERT INTO user_geofence (userId, geofenceId) VALUES (:userId, :geofenceId) - </entry> - - <entry key='database.unlinkUserGeofence'> - DELETE FROM user_geofence WHERE userId = :userId AND geofenceId = :geofenceId - </entry> - - <entry key='database.selectGroupGeofences'> - SELECT groupId, geofenceId FROM group_geofence - </entry> - - <entry key='database.linkGroupGeofence'> - INSERT INTO group_geofence (groupId, geofenceId) VALUES (:groupId, :geofenceId) - </entry> - - <entry key='database.unlinkGroupGeofence'> - DELETE FROM group_geofence WHERE groupId = :groupId AND geofenceId = :geofenceId - </entry> - - <entry key='database.selectDeviceGeofences'> - SELECT deviceId, geofenceId FROM device_geofence - </entry> - - <entry key='database.linkDeviceGeofence'> - INSERT INTO device_geofence (deviceId, geofenceId) VALUES (:deviceId, :geofenceId) - </entry> - - <entry key='database.unlinkDeviceGeofence'> - DELETE FROM device_geofence WHERE deviceId = :deviceId AND geofenceId = :geofenceId - </entry> - - <entry key='database.selectNotifications'> - SELECT * FROM notifications - </entry> - - <entry key='database.insertNotification'> - INSERT INTO notifications (userId, type, web, mail, sms, attributes) - VALUES (:userId, :type, :web, :mail, :sms, :attributes) - </entry> - - <entry key='database.updateNotification'> - UPDATE notifications SET - userId = :userId, - type = :type, - web = :web, - mail = :mail, - sms = :sms, - attributes = :attributes - WHERE id = :id - </entry> - - <entry key='database.deleteNotification'> - DELETE FROM notifications WHERE id = :id - </entry> - <entry key='database.deletePositions'> DELETE FROM positions WHERE serverTime < :serverTime AND id NOT IN (SELECT positionId FROM devices) </entry> @@ -323,171 +84,6 @@ SELECT * FROM statistics WHERE captureTime BETWEEN :from AND :to ORDER BY captureTime </entry> - <entry key='database.insertStatistics'> - INSERT INTO statistics (captureTime, activeUsers, activeDevices, requests, messagesReceived, messagesStored, mailSent, smsSent, geocoderRequests, geolocationRequests, attributes) - VALUES (:captureTime, :activeUsers, :activeDevices, :requests, :messagesReceived, :messagesStored, :mailSent, :smsSent, :geocoderRequests, :geolocationRequests, :attributes) - </entry> - - <entry key='database.selectCalendars'> - SELECT * FROM calendars - </entry> - - <entry key='database.insertCalendar'> - INSERT INTO calendars (name, data, attributes) - VALUES (:name, :data, :attributes) - </entry> - - <entry key='database.updateCalendar'> - UPDATE calendars SET - name = :name, - data = :data, - attributes = :attributes - WHERE id = :id - </entry> - - <entry key='database.deleteCalendar'> - DELETE FROM calendars WHERE id = :id - </entry> - - <entry key='database.selectUserCalendars'> - SELECT userId, calendarId FROM user_calendar - </entry> - - <entry key='database.linkUserCalendar'> - INSERT INTO user_calendar (userId, calendarId) VALUES (:userId, :calendarId) - </entry> - - <entry key='database.unlinkUserCalendar'> - DELETE FROM user_calendar WHERE userId = :userId AND calendarId = :calendarId - </entry> - - <entry key='database.selectUserUsers'> - SELECT userId, managedUserId FROM user_user - </entry> - - <entry key='database.linkUserManagedUser'> - INSERT INTO user_user (userId, managedUserId) VALUES (:userId, :managedUserId) - </entry> - - <entry key='database.unlinkUserManagedUser'> - DELETE FROM user_user WHERE userId = :userId AND managedUserId = :managedUserId - </entry> - - <entry key='database.selectAttributes'> - SELECT * FROM attributes - </entry> - - <entry key='database.insertAttribute'> - INSERT INTO attributes (description, type, attribute, expression) - VALUES (:description, :type, :attribute, :expression) - </entry> - - <entry key='database.updateAttribute'> - UPDATE attributes SET - description = :description, - type = :type, - attribute = :attribute, - expression = :expression - WHERE id = :id - </entry> - - <entry key='database.deleteAttribute'> - DELETE FROM attributes WHERE id = :id - </entry> - - <entry key='database.selectUserAttributes'> - SELECT userId, attributeId FROM user_attribute - </entry> - - <entry key='database.linkUserAttribute'> - INSERT INTO user_attribute (userId, attributeId) VALUES (:userId, :attributeId) - </entry> - - <entry key='database.unlinkUserAttribute'> - DELETE FROM user_attribute WHERE userId = :userId AND attributeId = :attributeId - </entry> - - <entry key='database.selectGroupAttributes'> - SELECT groupId, attributeId FROM group_attribute - </entry> - - <entry key='database.linkGroupAttribute'> - INSERT INTO group_attribute (groupId, attributeId) VALUES (:groupId, :attributeId) - </entry> - - <entry key='database.unlinkGroupAttribute'> - DELETE FROM group_attribute WHERE groupId = :groupId AND attributeId = :attributeId - </entry> - - <entry key='database.selectDeviceAttributes'> - SELECT deviceId, attributeId FROM device_attribute - </entry> - - <entry key='database.linkDeviceAttribute'> - INSERT INTO device_attribute (deviceId, attributeId) VALUES (:deviceId, :attributeId) - </entry> - - <entry key='database.unlinkDeviceAttribute'> - DELETE FROM device_attribute WHERE deviceId = :deviceId AND attributeId = :attributeId - </entry> - - <entry key='database.selectDrivers'> - SELECT * FROM drivers - </entry> - - <entry key='database.insertDriver'> - INSERT INTO drivers (name, uniqueId, attributes) - VALUES (:name, :uniqueId, :attributes) - </entry> - - <entry key='database.updateDriver'> - UPDATE drivers SET - name = :name, - uniqueId = :uniqueId, - attributes = :attributes - WHERE id = :id - </entry> - - <entry key='database.deleteDriver'> - DELETE FROM drivers WHERE id = :id - </entry> - - <entry key='database.selectUserDrivers'> - SELECT userId, driverId FROM user_driver - </entry> - - <entry key='database.linkUserDriver'> - INSERT INTO user_driver (userId, driverId) VALUES (:userId, :driverId) - </entry> - - <entry key='database.unlinkUserDriver'> - DELETE FROM user_driver WHERE userId = :userId AND driverId = :driverId - </entry> - - <entry key='database.selectGroupDrivers'> - SELECT groupId, driverId FROM group_driver - </entry> - - <entry key='database.linkGroupDriver'> - INSERT INTO group_driver (groupId, driverId) VALUES (:groupId, :driverId) - </entry> - - <entry key='database.unlinkGroupDriver'> - DELETE FROM group_driver WHERE groupId = :groupId AND driverId = :driverId - </entry> - - <entry key='database.selectDeviceDrivers'> - SELECT deviceId, driverId FROM device_driver - </entry> - - <entry key='database.linkDeviceDriver'> - INSERT INTO device_driver (deviceId, driverId) VALUES (:deviceId, :driverId) - </entry> - - <entry key='database.unlinkDeviceDriver'> - DELETE FROM device_driver WHERE deviceId = :deviceId AND driverId = :driverId - </entry> - <!-- PROTOCOL CONFIG --> <entry key='gps103.port'>5001</entry> |