|
|
@@ -428,8 +428,9 @@ class Core_AclHelper {// Helper class for Acl
|
|
|
case 'xsd:integer': $sqlType = "int(11) NOT NULL DEFAULT 0"; break;
|
|
|
case 'xsd:date': $sqlType = "date DEFAULT NULL"; break;
|
|
|
case 'xsd:decimal': $sqlType = "decimal(" . V::get('@totalDigits', 16, $schema) . ", " . V::get('@fractionDigits', 2, $schema) . ") NOT NULL DEFAULT 0"; break;
|
|
|
+ // TODO: type alias like enum fields: @type => "{$prefix}:{$field_name}Type"
|
|
|
}
|
|
|
- if (!$sqlType && !empty($schema['@ref'])) $sqlType = "int(11) NOT NULL DEFAULT 0";
|
|
|
+ if (!$sqlType && !empty($schema['@ref'])) $sqlType = "int(11) NOT NULL DEFAULT 0";// TODO: type from ref instance @primaryKey - mostly int
|
|
|
if (!$sqlType) throw new Exception("Unimplemented schema to sql for '{$rootTableName}/{$childName}' schema(".json_encode($schema).")");
|
|
|
DB::getPDO()->exec("
|
|
|
CREATE TABLE IF NOT EXISTS `{$histTable}` (
|