Update Rules
WRITE Command
Use ** between two command to seprate the command.
Command 1
**
Command 2
Example:
ADD_CLM|comp_datatable|ref_id|VARCHAR|20|1|NULL|tel_no
**
ADD_CLM|comp_datalist|data_item|INT|1|1|0|final_rate
**
ADD_CLM|comp_datalist_##PR##|data_item|INT|1|1|0|final_rate
CHANGE/CREATE Process Table
Use ##PR## if you want to use process id and any table eg. process_mapping_##PR##
Example:
If Change in both the table write command like below:
ADD_CLM|comp_datalist|data_item|INT|1|1|0|final_rate
**
ADD_CLM|comp_datalist_##PR##|data_item|INT|1|1|0|final_rate
To crate both the table master and process table (if avilable):
CRT_TBL|user_log_mapping|
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(100) NULL DEFAULT NULL,
`group_name` VARCHAR(50) NULL DEFAULT NULL,
`type` INT(11) NULL DEFAULT NULL,
PRIMARY KEY (`id`)
**
CRT_TBL|user_log_mapping_##PR##|
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(100) NULL DEFAULT NULL,
`group_name` VARCHAR(50) NULL DEFAULT NULL,
`type` INT(11) NULL DEFAULT NULL,
PRIMARY KEY (`id`)
ADD Column
ADD_CLM|table_name|column_name|type|constraint|allowNull(Y for NULL, N for NOT NULL)|default(If no default value use NULL)|after|comment (if any)|collation(if any eg. utf8mb4_general_ci)
Example:
ADD_CLM|user_log_mapping|data_item|INT|1|Y|0|type
ADD_CLM|user_log_mapping##PR##|data_item|INT|1|Y|NULL|type
ADD_CLM|user_log_mapping|data_name|VARCHAR|200|Y|0|type|name can be any string|utf8mb4_general_ci
ALTER Column
ALT_CLM|table_name|old_column_name|new_column_name(If no change in name use old column name)|type|constraint|allowNull(Y for NULL, N for NOT NULL)|default(If no default value use NULL)|after|comment (if any)|collation(if any eg. utf8mb4_general_ci)
Example:
ALT_CLM|user_log_mapping|data_item|data_item|INT|11|N|XYZ|bar_code
ALT_CLM|user_log_mapping|data_item|data_val|INT|11|N|XYZ|bar_code
ALT_CLM|user_log_mapping|data_name|data_name|INT|11|Y|0|type|name can be any string|utf8mb4_general_ci
DROP Column
DRP_CLM|table_name|column_name
Example:
DRP_CLM|comp_data|md_date
CREATE Table
CRT_TBL|table_name|add_column_command_comma_seprated
Example:
CRT_TBL|user_log_mapping|
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(100) NULL DEFAULT NULL,
`group_name` VARCHAR(50) NULL DEFAULT NULL,
`type` INT(11) NULL DEFAULT NULL,
PRIMARY KEY (`id`)
RENAME Table
RNM_TBL|old_table_name|new_table_name
Example:
RNM_TBL|comp_data|comp_metadata
RNM_TBL|comp_data_##PR##|comp_metadata_##PR##
DROP Table
DRP_TBL|table_name
Example:
DRP_TBL|comp_data
DRP_TBL|comp_data_##PR##
Run QUERY Direct
QRY|query
Example:
QUERY|insert into table (col1,col2) values (1,'AA')
QUERY|insert into table_##PR## (col1,col2) values (1,'AA')