CREATE TABLE ModuleDefinitionDataType
(
    nodeId BIGINT NOT NULL,
    sysName VARCHAR(60) NOT NULL,
    sortOrder TINYINT UNSIGNED DEFAULT NULL,
    isRequired TINYINT DEFAULT 0,
    indexed INT DEFAULT 0,
    isWorm INT DEFAULT 0,
    isUnique INT DEFAULT 0,
    isPrimary TINYINT DEFAULT 0,
    isLangSpecific INT DEFAULT 0,
    type VARCHAR(25) NOT NULL,
    length INT DEFAULT NULL,
    decimalPlace TINYINT DEFAULT NULL,
    php_type VARCHAR(50) DEFAULT NULL,
    isMultiple INT DEFAULT 0,
    isReadOnly INT DEFAULT 0,
    isSystem INT DEFAULT 0,
    isTab TINYINT DEFAULT NULL,
    isTabOnly TINYINT DEFAULT NULL,
    min_values TINYINT DEFAULT NULL,
    max_values INT DEFAULT NULL,
    format VARCHAR(25) DEFAULT NULL,
    list VARCHAR(75) DEFAULT NULL,
    isUnsigned INT DEFAULT NULL,
    node_type VARCHAR(255) DEFAULT NULL,
    hasParameters INT DEFAULT NULL,
    isOrdered INT DEFAULT NULL,
    getValueCB TINYBLOB DEFAULT NULL,
    hash VARCHAR(15) DEFAULT NULL,
    preg VARCHAR(255) DEFAULT NULL,
    length_field INT DEFAULT NULL,
    isQH INT DEFAULT NULL,
    default_offset MEDIUMINT DEFAULT NULL,
    defaultValue VARCHAR(255) DEFAULT NULL,
    xpath VARCHAR(255) DEFAULT NULL,
    qh_fields VARCHAR(255) DEFAULT NULL,
    qh_fields_table VARCHAR(255) DEFAULT NULL,
    columns BLOB DEFAULT NULL,
    newType VARCHAR(100) DEFAULT NULL,
    maxChars INT DEFAULT NULL,
    minChars INT DEFAULT NULL,
    maxValue INT DEFAULT NULL,
    minValue INT DEFAULT NULL,
    unit VARCHAR(30) DEFAULT NULL,
    list_items VARCHAR(255) DEFAULT NULL,
    isASCIIOnly TINYINT DEFAULT 0,
    parameters BLOB DEFAULT NULL,
    IsInherited TINYINT DEFAULT 0,
    TabId BIGINT UNSIGNED DEFAULT NULL,
    PRIMARY KEY ( nodeId,sysName ),
    KEY sysName ( sysName )

) ENGINE=INNODB CHARSET=UTF8 COMMENT="Module field definitions";
