Commit d6fb3920 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Increased size of password field to account for very large passwords (like facebook oauth)

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@12872 b35dd754-fafc-0310-a699-88a17e54d16e
parent b5bdcd1d
...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration ( ...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration (
jid VARCHAR(255) NOT NULL, jid VARCHAR(255) NOT NULL,
transportType VARCHAR(15) NOT NULL, transportType VARCHAR(15) NOT NULL,
username VARCHAR(255) NOT NULL, username VARCHAR(255) NOT NULL,
password VARCHAR(255), password VARCHAR(1024),
nickname VARCHAR(255), nickname VARCHAR(255),
registrationDate BIGINT NOT NULL, registrationDate BIGINT NOT NULL,
lastLogin BIGINT, lastLogin BIGINT,
...@@ -46,4 +46,4 @@ CREATE TABLE ofGatewayVCards ( ...@@ -46,4 +46,4 @@ CREATE TABLE ofGatewayVCards (
); );
CREATE INDEX ofGatewayVCards_jid_idx ON ofGatewayVCards (jid); CREATE INDEX ofGatewayVCards_jid_idx ON ofGatewayVCards (jid);
INSERT INTO ofVersion (name, version) VALUES ('gateway', 11); INSERT INTO ofVersion (name, version) VALUES ('gateway', 12);
...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration ( ...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration (
jid VARCHAR(255) NOT NULL, jid VARCHAR(255) NOT NULL,
transportType VARCHAR(15) NOT NULL, transportType VARCHAR(15) NOT NULL,
username VARCHAR(255) NOT NULL, username VARCHAR(255) NOT NULL,
password VARCHAR(255), password VARCHAR(1024),
nickname VARCHAR(255), nickname VARCHAR(255),
registrationDate BIGINT NOT NULL, registrationDate BIGINT NOT NULL,
lastLogin BIGINT, lastLogin BIGINT,
...@@ -46,4 +46,4 @@ CREATE TABLE ofGatewayVCards ( ...@@ -46,4 +46,4 @@ CREATE TABLE ofGatewayVCards (
); );
CREATE INDEX ofGatewayVCards_jid_idx ON ofGatewayVCards (jid); CREATE INDEX ofGatewayVCards_jid_idx ON ofGatewayVCards (jid);
INSERT INTO ofVersion (name, version) VALUES ('gateway', 11); INSERT INTO ofVersion (name, version) VALUES ('gateway', 12);
...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration ( ...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration (
jid VARCHAR(255) NOT NULL, jid VARCHAR(255) NOT NULL,
transportType VARCHAR(15) NOT NULL, transportType VARCHAR(15) NOT NULL,
username VARCHAR(255) NOT NULL, username VARCHAR(255) NOT NULL,
password VARCHAR(255), password VARCHAR(1024),
nickname VARCHAR(255), nickname VARCHAR(255),
registrationDate BIGINT NOT NULL, registrationDate BIGINT NOT NULL,
lastLogin BIGINT, lastLogin BIGINT,
...@@ -46,4 +46,4 @@ CREATE TABLE ofGatewayVCards ( ...@@ -46,4 +46,4 @@ CREATE TABLE ofGatewayVCards (
PRIMARY KEY (jid) PRIMARY KEY (jid)
); );
INSERT INTO ofVersion (name, version) VALUES ('gateway', 11); INSERT INTO ofVersion (name, version) VALUES ('gateway', 12);
...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration ( ...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration (
jid VARCHAR2(255) NOT NULL, jid VARCHAR2(255) NOT NULL,
transportType VARCHAR2(15) NOT NULL, transportType VARCHAR2(15) NOT NULL,
username VARCHAR2(255) NOT NULL, username VARCHAR2(255) NOT NULL,
password VARCHAR2(255), password VARCHAR2(1024),
nickname VARCHAR2(255), nickname VARCHAR2(255),
registrationDate INTEGER NOT NULL, registrationDate INTEGER NOT NULL,
lastLogin INTEGER, lastLogin INTEGER,
...@@ -46,6 +46,6 @@ CREATE TABLE ofGatewayVCards ( ...@@ -46,6 +46,6 @@ CREATE TABLE ofGatewayVCards (
); );
CREATE INDEX ofGatewayVCards_jid_idx ON ofGatewayVCards (jid); CREATE INDEX ofGatewayVCards_jid_idx ON ofGatewayVCards (jid);
INSERT INTO ofVersion (name, version) VALUES ('gateway', 11); INSERT INTO ofVersion (name, version) VALUES ('gateway', 12);
commit; commit;
...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration ( ...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration (
jid VARCHAR(255) NOT NULL, jid VARCHAR(255) NOT NULL,
transportType VARCHAR(15) NOT NULL, transportType VARCHAR(15) NOT NULL,
username VARCHAR(255) NOT NULL, username VARCHAR(255) NOT NULL,
password VARCHAR(255), password VARCHAR(1024),
nickname VARCHAR(255), nickname VARCHAR(255),
registrationDate CHAR(15) NOT NULL, registrationDate CHAR(15) NOT NULL,
lastLogin CHAR(15), lastLogin CHAR(15),
...@@ -46,4 +46,4 @@ CREATE TABLE ofGatewayVCards ( ...@@ -46,4 +46,4 @@ CREATE TABLE ofGatewayVCards (
); );
CREATE INDEX ofGatewayVCards_jid_idx ON ofGatewayVCards (jid); CREATE INDEX ofGatewayVCards_jid_idx ON ofGatewayVCards (jid);
INSERT INTO ofVersion (name, version) VALUES ('gateway', 11); INSERT INTO ofVersion (name, version) VALUES ('gateway', 12);
...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration ( ...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration (
jid NVARCHAR(255) NOT NULL, jid NVARCHAR(255) NOT NULL,
transportType NVARCHAR(15) NOT NULL, transportType NVARCHAR(15) NOT NULL,
username NVARCHAR(255) NOT NULL, username NVARCHAR(255) NOT NULL,
password NVARCHAR(255), password NVARCHAR(1024),
nickname NVARCHAR(255), nickname NVARCHAR(255),
registrationDate BIGINT NOT NULL, registrationDate BIGINT NOT NULL,
lastLogin BIGINT, lastLogin BIGINT,
...@@ -46,4 +46,4 @@ CREATE TABLE ofGatewayVCards ( ...@@ -46,4 +46,4 @@ CREATE TABLE ofGatewayVCards (
); );
CREATE INDEX ofGatewayVCards_jid_idx ON ofGatewayVCards (jid); CREATE INDEX ofGatewayVCards_jid_idx ON ofGatewayVCards (jid);
INSERT INTO ofVersion (name, version) VALUES ('gateway', 11); INSERT INTO ofVersion (name, version) VALUES ('gateway', 12);
...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration ( ...@@ -3,7 +3,7 @@ CREATE TABLE ofGatewayRegistration (
jid NVARCHAR(255) NOT NULL, jid NVARCHAR(255) NOT NULL,
transportType NVARCHAR(15) NOT NULL, transportType NVARCHAR(15) NOT NULL,
username NVARCHAR(255) NOT NULL, username NVARCHAR(255) NOT NULL,
password NVARCHAR(255), password NVARCHAR(1024),
nickname NVARCHAR(255), nickname NVARCHAR(255),
registrationDate INTEGER NOT NULL, registrationDate INTEGER NOT NULL,
lastLogin INTEGER, lastLogin INTEGER,
...@@ -46,4 +46,4 @@ CREATE TABLE ofGatewayVCards ( ...@@ -46,4 +46,4 @@ CREATE TABLE ofGatewayVCards (
); );
CREATE INDEX ofGatewayVCards_jid_idx ON ofGatewayVCards (jid); CREATE INDEX ofGatewayVCards_jid_idx ON ofGatewayVCards (jid);
INSERT INTO ofVersion (name, version) VALUES ('gateway', 11); INSERT INTO ofVersion (name, version) VALUES ('gateway', 12);
-- Update password field size to 1024
ALTER TABLE ofGatewayRegistration ALTER COLUMN password SET DATA TYPE VARCHAR(1024);
-- Update database version
UPDATE ofVersion SET version = 12 WHERE name = 'gateway';
// Update password field size to 1024
ALTER TABLE ofGatewayRegistration ALTER COLUMN password VARCHAR(1024);
// Update database version
UPDATE ofVersion SET version = 12 WHERE name = 'gateway';
# Update password field size to 1024
ALTER TABLE ofGatewayRegistration MODIFY COLUMN password VARCHAR(1024);
# Update database version
UPDATE ofVersion SET version = 12 WHERE name = 'gateway';
-- Update password field size to 1024
ALTER TABLE ofGatewayRegistration MODIFY password VARCHAR(1024);
-- Update database version
UPDATE ofVersion SET version = 12 WHERE name = 'gateway';
commit;
-- Update password field size to 1024
ALTER TABLE ofGatewayRegistration ALTER COLUMN password TYPE VARCHAR(1024);
-- Update database version
UPDATE ofVersion SET version = 12 WHERE name = 'gateway';
/* Update password field size to 1024 */
ALTER TABLE ofGatewayRegistration ALTER COLUMN password VARCHAR(1024);
/* Update database version */
UPDATE ofVersion SET version = 12 WHERE name = 'gateway';
/* Update password field size to 1024 */
ALTER TABLE ofGatewayRegistration MODIFY password VARCHAR(1024);
/* Update database version */
UPDATE ofVersion SET version = 12 WHERE name = 'gateway';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment