CREATE TABLE MCP_VIEW_ARGUMENTS (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT
,parent_id BIGINT UNSIGNED NULL COMMENT 'foreign key to argument in which one argument overrides the value of another, but not the type or context'
,view_id BIGINT UNSIGNED NOT NULL COMMENT 'foreign key to view argument belongs to'
,system_name VARCHAR(128) NOT NULL COMMENT 'Name of argument'
,human_name VARCHAR(128) NOT NULL COMMENT 'title/label of argument'
,VALUE LONGTEXT NOT NULL COMMENT 'This may be a class name, function name, get ref, post ref, view ref, static value, etc based on the context. The context will determine how the value is handled within the application.'
,TYPE ENUM('string','int','bool','float') COMMENT 'The value type to cast the string to on the application end'
,context ENUM('static','post','get','request','global_arg','module_arg','dao','function','class','view') NOT NULL
,context_routine VARCHAR(128) NULL COMMENT 'The function or method name to call to derive the true value for dao, class and function contexts'
,context_args LONGTEXT NULL COMMENT 'Serialized array of arguments to pass to a method or function call for dao, function and class context'
,required TINYINT UNSIGNED NOT NULL DEFAULT '0' COMMENT 'For context other than static whether the argument is required to build the view'
,removed TINYINT UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Determines whether argument has been removed for a overriding view'
,updated_on_timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
,created_on_timestamp TIMESTAMP NULL DEFAULT NULL
,deleted_on_timestamp TIMESTAMP NULL DEFAULT NULL
,deleted TINYINT UNSIGNED DEFAULT '0'
,PRIMARY KEY(id)
,UNIQUE KEY(view_id,system_name,deleted)
,UNIQUE KEY(view_id,human_name,deleted)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Contains arguments that may be referenced via select options, filter values and sorting priorities when building views that require dynamically derived data references.';
Bookmarks