|
|
@@ -199,16 +199,20 @@ class Schema_SystemObjectStorageAcl extends Core_AclSimpleSchemaBase {
|
|
|
UI::alert('warning', "TODO: { id: {$source['idZasob']}, nsPrefix: '{$source['nsPrefix']}', dbName: '{$dbName}', dbType: '{$dbType}'} ...");
|
|
|
// TODO: if another DB split select and insert
|
|
|
DB::getPDO()->execSql("
|
|
|
- insert into `{$this->_rootTableName}` (namespace, idDatabase, _rootTableName, _type, description)
|
|
|
+ insert into `{$this->_rootTableName}` (namespace, idDatabase, _rootTableName, _type, description, hasStruct, isStructInstalled)
|
|
|
select concat('{$source['nsPrefix']}/', t.TABLE_NAME) as namespace
|
|
|
, '{$source['idZasob']}' as idDatabase
|
|
|
, t.TABLE_NAME as _rootTableName
|
|
|
, 'TableAcl' as _type
|
|
|
, t.TABLE_COMMENT as description
|
|
|
+ , 1 as hasStruct
|
|
|
+ , 1 as isStructInstalled
|
|
|
from INFORMATION_SCHEMA.TABLES t
|
|
|
where t.TABLE_SCHEMA = '{$dbName}'
|
|
|
and t.TABLE_NAME not like '%#%'
|
|
|
on duplicate key update _rootTableName = t.TABLE_NAME
|
|
|
+ , hasStruct = 1
|
|
|
+ , isStructInstalled = 1
|
|
|
");
|
|
|
DB::getPDO()->execSql("
|
|
|
insert into `{$this->_rootTableName}` (namespace, idZasob, idDatabase, description, hasStruct)
|
|
|
@@ -225,7 +229,7 @@ class Schema_SystemObjectStorageAcl extends Core_AclSimpleSchemaBase {
|
|
|
and t.A_STATUS in('NORMAL', 'WAITING')
|
|
|
and t.PARENT_ID = {$source['idZasob']}
|
|
|
on duplicate key update idZasob = t.ID
|
|
|
- , hasStruct = 1
|
|
|
+ , hasStruct = 1
|
|
|
");
|
|
|
// } else if ('pgsql' == $dbType) {// TODO: use pgsql @see Storage Pgsql getTables from information_schema
|
|
|
} else {
|