Skip to content
Snippets Groups Projects
Commit 58668a6e authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

Update logoutstore table migration syntax for PostgreSQL

parent adf1eb86
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,16 @@ class LogoutStore
return;
} elseif ($tableVer === 1) {
/* TableVersion 2 increased the column size to 255 which is the maximum length of a FQDN. */
$query = 'ALTER TABLE ' . $store->prefix . '_saml_LogoutStore MODIFY _authSource VARCHAR(255) NOT NULL';
switch ($store->driver) {
case 'pgsql':
// This does not affect the NOT NULL constraint
$query = 'ALTER TABLE ' . $store->prefix . '_saml_LogoutStore ALTER COLUMN _authSource TYPE VARCHAR(255)';
break;
default:
$query = 'ALTER TABLE ' . $store->prefix . '_saml_LogoutStore MODIFY _authSource VARCHAR(255) NOT NULL';
break;
}
try {
$store->pdo->exec($query);
} catch (\Exception $e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment