The GeneXus Access Manager Database structure has changed in GeneXus 15 Upgrade 11; so, a reorganization is required for upgrading to the new version 4.0.4.
The Database reorganization is automatically performed after pressing F5 in GeneXus, and it may also be executed using the Deploy Tool.
When the user opens the KB for the first time using GeneXus 15 upgrade 11, a dialog warns the user that a Database reorganization is needed to update GAM to version 4.0.4. If confirmed, the Database will be reorganized.
As usual, the GAM external objects (GAM Library) will be imported to update to the new upgrade.
Reorgs are always done incrementally, one after the other:
- from 3.0.6 to 4.0.0
- from 4.0.0 to 4.0.1
- from 4.0.1 to 4.0.2
- from 4.0.2 to 4.0.3
- from 4.0.3 to 4.0.4
Reorganization to version 4.0.4
The reorg basically implies the following:
- New table SessionHistoryLog
- Changes in Session and SessionHistory columns.
In particular, the SQL sentences executed are as follows:
ALTER TABLE gam.[Session] ADD [SesJson] NVARCHAR(MAX) NULL , [SesExtTokenRefresh] nvarchar(2000) NULL , [SesExtTokenExpires] datetime NULL , [SesExtToken3] NVARCHAR(MAX) NULL
ALTER TABLE gam.[SessionHistory] ADD [SesHisJson] NVARCHAR(MAX) NULL , [SesHisAutTypeName] nchar(60) NULL , [SesHisExtTokenRefresh] nvarchar(2000) NULL , [SesHisExtTokenExpires] datetime NULL , [SesHisExtToken3] NVARCHAR(MAX) NULL
CREATE TABLE gam.[SessionHistoryLog] ([RepId] int NOT NULL , [SesHisToken] nchar(120) NOT NULL , [SesHisLogGuid] nchar(40) NOT NULL , [SesHisLogDateTime] datetime NOT NULL ,[SesHisLogType] nchar(30) NOT NULL , [SesHisLogDetail] NVARCHAR(MAX) NULL , PRIMARY KEY([RepId], [SesHisToken], [SesHisLogGuid]))
The reorganization script is <GX folder>\Library\GAM\Net<platform>\ReorganizationScript403To404.txt.
About GAM Deploy Tool
The GAM Deploy Tool has the "Update GAM Schema" option, which allows updating the Database to its latest version.
When importing data into a Database version 4.0.3 (or older) that has been exported from a Database version 4.0.4, the user will be notified about a reorganization of the Database tables.
Data exported from a Database version 4.0.4 cannot be imported into a Database version 4.0.3 (or older) without doing a reorganization first.
To do so, download the GAM Deploy Tool version corresponding to your GAM Database structure.
Compatibility between GAM 4.0.4 and older versions of GeneXus
- Applications generated with versions prior to GeneXus 15 upgrade 11 may use the GAM Database 4.0.4.
- Applications generated with GeneXus 15 upgrade 11 always use GAM version 4.0.4.
- Because for any Authentication type you now have the possibility to indicate an image that is used in the GAMExamplelogin, in the conversion to 4.0.4, a procedure is automatically executed that assigns a default image for those types of Authentication (Facebook, Twitter, Google) that you have defined in advance - prior to the conversion to 4.0.4.