1
0
Fork 0
mirror of synced 2024-06-01 10:29:48 +12:00

Merge pull request #8091 from appwrite/fix-namespace-with-override

Ensure namespace is set if override equals shared tables
This commit is contained in:
Jake Barnby 2024-05-08 16:05:32 +12:00 committed by GitHub
commit f31ebd9c60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -154,9 +154,14 @@ App::post('/v1/projects')
// TODO: One in 20 projects use shared tables. Temporary until all projects are using shared tables.
if (
!\mt_rand(0, 19)
&& System::getEnv('_APP_DATABASE_SHARED_TABLES', 'enabled') === 'enabled'
&& System::getEnv('_APP_EDITION', 'self-hosted') !== 'self-hosted'
(
!\mt_rand(0, 19)
&& System::getEnv('_APP_DATABASE_SHARED_TABLES', 'enabled') === 'enabled'
&& System::getEnv('_APP_EDITION', 'self-hosted') !== 'self-hosted'
) ||
(
$dsn === DATABASE_SHARED_TABLES
)
) {
$schema = 'appwrite';
$database = 'appwrite';