Changeset 11672
- Timestamp:
- May 18, 2009, 4:37:47 PM (13 years ago)
- Location:
- OpenPNE/branches/work/fukamachi/db_converter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/branches/work/fukamachi/db_converter/db_converter.php
r11594 r11672 34 34 // 対応表からSQLを生成 35 35 $insert_ary = array(); 36 $delete_ary = array(); 36 37 foreach ($sql_list as $sql) { 38 if (array_key_exists('clear', $sql) && $sql['clear'] === 1) { 39 array_push($delete_ary, clear_record_installed($sql['table'])); 40 } 41 37 42 $insert; 38 43 if (array_key_exists('special', $sql) && $sql['special'] === 1) { … … 46 51 47 52 // とりあえず出力 53 print_r($delete_ary); 48 54 print_r($insert_ary); 49 55 … … 162 168 } 163 169 170 /****************************** 171 * インストールレコードの削除 * 172 ******************************/ 173 174 function clear_record_installed($table) 175 { 176 return 'DELETE FROM `'.$table.'`'; 177 } 164 178 165 179 /********************** -
OpenPNE/branches/work/fukamachi/db_converter/db_relation.yml
r11594 r11672 1 1 - table: admin_user 2 2 column: [id, username, password] 3 clear: 1 3 4 sql: > 4 5 SELECT … … 44 45 - table: community_category 45 46 special: 1 47 clear: 1 46 48 column: [id, lft_key, rht_key, tree_key, name, sort_order, is_allow_member_community] 47 49 sql1: > … … 278 280 - table: member 279 281 special: 1 282 clear: 1 280 283 column: [id, name, is_active, invite_member_id, created_at, updated_at] 281 284 sql1: > … … 299 302 - table: member_config 300 303 special: 1 304 clear: 1 301 305 column: [id, member_id, name, value] 302 306 sql: > … … 353 357 - table: member_profile 354 358 special: 1 359 clear: 1 355 360 # public_flag は3.0.3以降で実装 356 361 column: [id, lft_key, rht_key, tree_key, member_id, profile_id, profile_option_id, value, public_flag] … … 497 502 498 503 - table: profile 504 clear: 1 499 505 column: [id, name, is_required, is_unique, form_type, value_type, value_regexp, value_min, value_max, is_disp_regist, is_disp_config, is_disp_search, sort_order] 500 506 sql: > … … 516 522 517 523 - table: profile_option 524 clear: 1 518 525 column: [id, profile_id, sort_order] 519 526 sql: >
Note: See TracChangeset
for help on using the changeset viewer.