new_child('MYSQL_SCHEMA'); $new_table = $new_MYSQL_SCHEMA->new_child('TABLES'); $new_table->set_option('Table_type','BASE TABLE'); $new_table->set_option('NAME','_ANALIZA_HISTORII_ALL'); $new_table_field = $new_table->new_child('FIELDS'); $new_table_field->set_option('Field','ID'); $new_table_field->set_option('Null','NO'); $new_table_field->set_option('Key','PRI'); $new_table_field->set_option('Default',''); $new_table_field->set_option('Extra','auto_increment'); $new_table_field_id = $new_table_field->new_child('Type'); $new_table_field_id_int = $new_table_field_id->new_child('int'); $new_table_field_id_int->set_option('M','11'); DEBUG_S(-3,'new_table_field',$new_table_field); // unset($new_table_field);unset($new_table_field_id);unset($new_table_field_id_int); $new_table_field = $new_table->new_child('FIELDS'); $new_table_field->set_option('Field','TABLE_NAME'); $new_table_field->set_option('Null','NO'); $new_table_field->set_option('Key',''); $new_table_field->set_option('Default',''); $new_table_field->set_option('Extra','auto_increment'); $new_table_field_id = $new_table_field->new_child('Type'); $new_table_field_id_int = $new_table_field_id->new_child('varchar'); $new_table_field_id_int->set_option('M','255'); DEBUG_S(-3,'new_table_field',$new_table_field); $new_table_field = $new_table->new_child('FIELDS'); $new_table_field->set_option('Field','TABLE_ID'); $new_table_field->set_option('Null','NO'); $new_table_field->set_option('Key',''); $new_table_field->set_option('Default',''); $new_table_field->set_option('Extra','auto_increment'); $new_table_field_id = $new_table_field->new_child('Type'); $new_table_field_id_int = $new_table_field_id->new_child('int'); $new_table_field_id_int->set_option('M','11'); $new_table_field = $new_table->new_child('FIELDS'); $new_table_field->set_option('Field','FIELD'); $new_table_field->set_option('Null','NO'); $new_table_field->set_option('Key',''); $new_table_field->set_option('Default',''); $new_table_field->set_option('Extra','auto_increment'); $new_table_field_id = $new_table_field->new_child('Type'); $new_table_field_id_int = $new_table_field_id->new_child('varchar'); $new_table_field_id_int->set_option('M','255'); $new_table_field = $new_table->new_child('FIELDS'); $new_table_field->set_option('Field','VALUE_OLD'); $new_table_field->set_option('Null','NO'); $new_table_field->set_option('Key',''); $new_table_field->set_option('Default',''); $new_table_field->set_option('Extra','auto_increment'); $new_table_field_id = $new_table_field->new_child('Type'); $new_table_field_id_int = $new_table_field_id->new_child('text'); $new_table_field = $new_table->new_child('FIELDS'); $new_table_field->set_option('Field','VALUE'); $new_table_field->set_option('Null','NO'); $new_table_field->set_option('Key',''); $new_table_field->set_option('Default',''); $new_table_field->set_option('Extra','auto_increment'); $new_table_field_id = $new_table_field->new_child('Type'); $new_table_field_id_int = $new_table_field_id->new_child('text'); $new_table_field = $new_table->new_child('FIELDS'); $new_table_field->set_option('Field','A_RECORD_UPDATE_DATE'); $new_table_field->set_option('Null','NO'); $new_table_field->set_option('Key',''); $new_table_field->set_option('Default',''); $new_table_field->set_option('Extra','auto_increment'); $new_table_field_id = $new_table_field->new_child('Type'); $new_table_field_id_int = $new_table_field_id->new_child('varchar'); $new_table_field_id_int->set_option('M','30'); $new_table_field = $new_table->new_child('FIELDS'); $new_table_field->set_option('Field','A_RECORD_UPDATE_AUTHOR'); $new_table_field->set_option('Null','NO'); $new_table_field->set_option('Key',''); $new_table_field->set_option('Default',''); $new_table_field->set_option('Extra','auto_increment'); $new_table_field_id = $new_table_field->new_child('Type'); $new_table_field_id_int = $new_table_field_id->new_child('varchar'); $new_table_field_id_int->set_option('M','100'); $new_table_field = $new_table->new_child('FIELDS'); $new_table_field->set_option('Field','A_RECORD_CREATE_DATE'); $new_table_field->set_option('Null','NO'); $new_table_field->set_option('Key',''); $new_table_field->set_option('Default',''); $new_table_field->set_option('Extra','auto_increment'); $new_table_field_id = $new_table_field->new_child('Type'); $new_table_field_id_int = $new_table_field_id->new_child('varchar'); $new_table_field_id_int->set_option('M','30'); $new_table_field = $new_table->new_child('FIELDS'); $new_table_field->set_option('Field','A_RECORD_CREATE_AUTHOR'); $new_table_field->set_option('Null','NO'); $new_table_field->set_option('Key',''); $new_table_field->set_option('Default',''); $new_table_field->set_option('Extra','auto_increment'); $new_table_field_id = $new_table_field->new_child('Type'); $new_table_field_id_int = $new_table_field_id->new_child('varchar'); $new_table_field_id_int->set_option('M','100'); $new_table_index = $new_table->new_child('INDEX'); $new_table_index->set_option('Key_name','TABLE_NAME'); $new_table_index_col = $new_table_index->new_child('Column_name'); $new_table_index_col->set_option('column','TABLE_NAME'); $new_table_index_col = $new_table_index->new_child('Column_name'); $new_table_index_col->set_option('column','TABLE_ID'); $new_table_index_col = $new_table_index->new_child('Column_name'); $new_table_index_col->set_option('column','FIELD'); // $new_table_index = $new_table->new_child('INDEX'); // $new_table_field = $new_table_field->set_option('TABLE_FIELD_TYPE','INT'); // // $new_table_field = $new_table->new_child('TABLE_FIELD'); // $new_table_field = $new_table_field->set_option('TABLE_FIELD_NAME','A_RECORD_UPDATE_DATE'); // $new_table_field = $new_table_field->set_option('TABLE_FIELD_TYPE','VARCHAR'); // $new_table_field = $new_table_field->set_option('TABLE_FIELD_LENGHT','100'); // $new_table->NEW_TABLE('dupa'); DEBUG_S(-3,'installer',$installer); DEBUG_S(-3,'new_MYSQL_SCHEMA',$new_MYSQL_SCHEMA); DEBUG_S(-3,'new_table',$new_table); DEBUG_S(-3,'new_table_field',$new_table_field); // DEBUG_S(-3,'new_table',$new_table); //$install->__add_req_option('table'); $installer->__install(); //$table->get_options_status(); //var_dump($install); //InstallerHelper::__install(); die('umarlem'); } Lib::loadClass('ProcesHelper'); $zasob_tabeli_hist=ProcesHelper::getZasobTableID('_ANALIZA_HISTORII_ALL'); ?> ANALIZA_HISTORII_ALL