mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
GUACAMOLE-317: Add "failover_only" column to database schema for Guacamole connections.
This commit is contained in:
@@ -65,9 +65,9 @@ CREATE TABLE `guacamole_connection` (
|
||||
`max_connections` int(11),
|
||||
`max_connections_per_user` int(11),
|
||||
|
||||
-- Connection weight
|
||||
-- Load-balancing behavior
|
||||
`connection_weight` int(11),
|
||||
|
||||
`failover_only` boolean NOT NULL DEFAULT 0,
|
||||
|
||||
PRIMARY KEY (`connection_id`),
|
||||
UNIQUE KEY `connection_name_parent` (`connection_name`, `parent_id`),
|
||||
|
@@ -23,3 +23,10 @@
|
||||
|
||||
ALTER TABLE guacamole_connection
|
||||
ADD COLUMN connection_weight int(11);
|
||||
|
||||
--
|
||||
-- Add failover-only flag
|
||||
--
|
||||
|
||||
ALTER TABLE guacamole_connection
|
||||
ADD COLUMN failover_only BOOLEAN NOT NULL DEFAULT 0;
|
||||
|
@@ -38,6 +38,7 @@
|
||||
<result column="proxy_encryption_method" property="proxyEncryptionMethod" jdbcType="VARCHAR"
|
||||
javaType="org.apache.guacamole.net.auth.GuacamoleProxyConfiguration$EncryptionMethod"/>
|
||||
<result column="connection_weight" property="connectionWeight" jdbcType="INTEGER"/>
|
||||
<result column="failover_only" property="failoverOnly" jdbcType="BOOLEAN"/>
|
||||
|
||||
<!-- Associated sharing profiles -->
|
||||
<collection property="sharingProfileIdentifiers" resultSet="sharingProfiles" ofType="java.lang.String"
|
||||
@@ -97,7 +98,8 @@
|
||||
proxy_hostname,
|
||||
proxy_port,
|
||||
proxy_encryption_method,
|
||||
connection_weight
|
||||
connection_weight,
|
||||
failover_only
|
||||
FROM guacamole_connection
|
||||
WHERE connection_id IN
|
||||
<foreach collection="identifiers" item="identifier"
|
||||
@@ -129,7 +131,8 @@
|
||||
proxy_hostname,
|
||||
proxy_port,
|
||||
proxy_encryption_method,
|
||||
connection_weight
|
||||
connection_weight,
|
||||
failover_only
|
||||
FROM guacamole_connection
|
||||
JOIN guacamole_connection_permission ON guacamole_connection_permission.connection_id = guacamole_connection.connection_id
|
||||
WHERE guacamole_connection.connection_id IN
|
||||
@@ -166,7 +169,8 @@
|
||||
proxy_hostname,
|
||||
proxy_port,
|
||||
proxy_encryption_method,
|
||||
connection_weight
|
||||
connection_weight,
|
||||
failover_only
|
||||
FROM guacamole_connection
|
||||
WHERE
|
||||
<if test="parentIdentifier != null">parent_id = #{parentIdentifier,jdbcType=VARCHAR}</if>
|
||||
@@ -194,7 +198,8 @@
|
||||
proxy_hostname,
|
||||
proxy_port,
|
||||
proxy_encryption_method,
|
||||
connection_weight
|
||||
connection_weight,
|
||||
failover_only
|
||||
)
|
||||
VALUES (
|
||||
#{object.name,jdbcType=VARCHAR},
|
||||
@@ -205,7 +210,8 @@
|
||||
#{object.proxyHostname,jdbcType=VARCHAR},
|
||||
#{object.proxyPort,jdbcType=INTEGER},
|
||||
#{object.proxyEncryptionMethod,jdbcType=VARCHAR},
|
||||
#{object.connectionWeight,jdbcType=INTEGER}
|
||||
#{object.connectionWeight,jdbcType=INTEGER},
|
||||
#{object.failoverOnly,jdbcType=BOOLEAN}
|
||||
)
|
||||
|
||||
</insert>
|
||||
@@ -222,6 +228,7 @@
|
||||
proxy_port = #{object.proxyPort,jdbcType=INTEGER},
|
||||
proxy_encryption_method = #{object.proxyEncryptionMethod,jdbcType=VARCHAR},
|
||||
connection_weight = #{object.connectionWeight,jdbcType=INTEGER}
|
||||
failover_only = #{object.failoverOnly,jdbcType=BOOLEAN}
|
||||
WHERE connection_id = #{object.objectID,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
|
Reference in New Issue
Block a user