Before Upgrading
The upgrade patch contains updates to database schemas. To avoid timeouts for databases managing a large amount of users, manually execute one of the following SQL statements on ranger db before starting the upgrade.
DB Flavor | SQL Statement |
---|---|
MySQL | ALTER TABLE x_user MODIFY COLUMN user_name varchar(767) NOT NULL, ADD
CONSTRAINT x_user_UK_user_name UNIQUE(user_name(767)); |
Oracle | ALTER TABLE x_user MODIFY(user_name VARCHAR(767)) ADD CONSTRAINT
x_user_UK_user_name UNIQUE (user_name); |
Postgres | ALTER TABLE x_user ALTER COLUMN user_name TYPE VARCHAR(767),ADD
CONSTRAINT x_user_UK_user_name UNIQUE(user_name); |
SQLServer | ALTER TABLE [dbo].[x_user] ALTER COLUMN [user_name] [varchar](767) NOT
NULL; ALTER TABLE [dbo].[x_user] ADD CONSTRAINT [x_user$x_user_UK_user_name]
UNIQUE ([user_name]); |
SQL Anywhere | ALTER TABLE dbo.x_user ALTER user_name varchar(767) NOT NULL;ALTER TABLE
dbo.x_user ADD CONSTRAINT x_user_UK_user_name UNIQUE NONCLUSTERED
(user_name); |
Note | |
---|---|
Execution of SQL statement on x_user table having one million users should not take more than ~30 seconds. |