summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-22 13:37:56 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-22 13:37:56 +0100
commita05a9f2fcb2b1a38482fe8f8cbaa1e7ec7a15a29 (patch)
treee32b2390467b8e782e9b78da2c4a1553d65f6a3b
parenta6cad8fcba2dd8af532dc60f49dda02ee3f46cc5 (diff)
downloadusers-a05a9f2fcb2b1a38482fe8f8cbaa1e7ec7a15a29.tar.gz
users-a05a9f2fcb2b1a38482fe8f8cbaa1e7ec7a15a29.tar.bz2
users-a05a9f2fcb2b1a38482fe8f8cbaa1e7ec7a15a29.zip
Fix users_auth_map schema: remove inline CONSTRAINT that broke Firebird installs
The inline CONSTRAINT clause used backtick-quoted identifiers which Firebird rejects. Moved the FK to registerSchemaConstraints following the liberty pattern. This caused USERS_AUTH_MAP to be missing on all Firebird installs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rw-r--r--admin/schema_inc.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 63b9527..5c26b67 100644
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -45,7 +45,6 @@ $tables = [
provider_identifier C(64) NOTNULL,
last_login I8,
profile_json X
- CONSTRAINT ', CONSTRAINT `users_auth_user_ref` FOREIGN KEY (`user_id`) REFERENCES `".BIT_DB_PREFIX."users_users` (`user_id`)'
",
'users_permissions' => "
@@ -183,6 +182,13 @@ $indices = [ ...$team_indices,
];
$gBitInstaller->registerSchemaIndexes( USERS_PKG_NAME, $indices );
+$constraints = [
+ 'users_auth_map' => [ 'users_auth_user_ref' => 'FOREIGN KEY (`user_id`) REFERENCES `' . BIT_DB_PREFIX . 'users_users` (`user_id`)' ],
+];
+foreach( array_keys( $constraints ) as $tableName ) {
+ $gBitInstaller->registerSchemaConstraints( USERS_PKG_NAME, $tableName, $constraints[$tableName] );
+}
+
$gBitInstaller->registerPackageInfo( USERS_PKG_NAME, [
'description' => "The users package contains all user information and gives you the possiblity to assign permissions to users.",
'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>',