Mercurial > epgrec.yaz
comparison upgrade_db.php @ 142:481e789605e3
mod: EPGの更新と同時に予約情報を更新するように変更、ログビューアの追加
author | epgrec@park.mda.or.jp <yoneda@recorder.localnet.mda.or.jp> |
---|---|
date | Sun, 21 Mar 2010 16:42:58 +0900 |
parents | 9c5e597ef6c6 |
children | 0283c2c75147 |
comparison
equal
deleted
inserted
replaced
136:6754b6aa50cf | 142:481e789605e3 |
---|---|
64 "alter table ".$settings->tbl_prefix.RESERVE_TBL." modify reserve_disc varchar(128) not null default 'none';", // 茘ョhash | 64 "alter table ".$settings->tbl_prefix.RESERVE_TBL." modify reserve_disc varchar(128) not null default 'none';", // 茘ョhash |
65 "alter table ".$settings->tbl_prefix.RESERVE_TBL." modify autorec integer not null default '0';", // 若若ID | 65 "alter table ".$settings->tbl_prefix.RESERVE_TBL." modify autorec integer not null default '0';", // 若若ID |
66 "alter table ".$settings->tbl_prefix.RESERVE_TBL." modify mode integer not null default '0';", //牙祉≪若 | 66 "alter table ".$settings->tbl_prefix.RESERVE_TBL." modify mode integer not null default '0';", //牙祉≪若 |
67 ); | 67 ); |
68 | 68 |
69 if( index_exists( $settings->tbl_prefix.RESERVE_TBL, "dirty", $dbh) ) { | |
70 echo "dirtyc若с絖篏障\n"; | |
71 } | |
72 else { | |
73 array_push( $sqlstrs, "alter table ".$settings->tbl_prefix.RESERVE_TBL." add dirty boolean not null default '0';" ); | |
74 } | |
75 | |
69 if( multi_query( $sqlstrs, $dbh ) ) { | 76 if( multi_query( $sqlstrs, $dbh ) ) { |
70 echo "篋膣若≪若紊掩\n"; | 77 echo "篋膣若≪若紊掩\n"; |
71 } | 78 } |
72 | 79 |
73 // ゃ潟壕申 | 80 // ゃ潟壕申 |
176 else { | 183 else { |
177 array_push( $sqlstrs, "alter table ".$settings->tbl_prefix.KEYWORD_TBL." add autorec_mode integer not null default '0';"); | 184 array_push( $sqlstrs, "alter table ".$settings->tbl_prefix.KEYWORD_TBL." add autorec_mode integer not null default '0';"); |
178 } | 185 } |
179 if( column_exists( $settings->tbl_prefix.KEYWORD_TBL, "weekofday", $dbh ) ) { | 186 if( column_exists( $settings->tbl_prefix.KEYWORD_TBL, "weekofday", $dbh ) ) { |
180 echo "weekofday絖т障\n"; | 187 echo "weekofday絖т障\n"; |
181 } | 188 array_push( $sqlstrs, "alter table ".$settings->tbl_prefix.KEYWORD_TBL." modify weekofday enum ('0','1','2','3','4','5','6','7' ) not null default '7'" ); |
182 else { | 189 } |
183 array_push( $sqlstrs, "alter table ".$settings->tbl_prefix.KEYWORD_TBL." add weekofday enum ('0','1','2','3','4','5','6','7' ) default '7'" ); | 190 else { |
191 array_push( $sqlstrs, "alter table ".$settings->tbl_prefix.KEYWORD_TBL." add weekofday enum ('0','1','2','3','4','5','6','7' ) not null default '7'" ); | |
184 } | 192 } |
185 if( column_exists( $settings->tbl_prefix.KEYWORD_TBL, "prgtime", $dbh ) ) { | 193 if( column_exists( $settings->tbl_prefix.KEYWORD_TBL, "prgtime", $dbh ) ) { |
186 echo "prgtime絖т障\n"; | 194 echo "prgtime絖т障\n"; |
195 array_push( $sqlstrs, | |
196 "alter table ".$settings->tbl_prefix.KEYWORD_TBL." modify prgtime enum ('0','1','2','3','4','5','6','7','8','9','10','11','12',". | |
197 "'13','14','15','16','17','18','19','20','21','22','23','24') not null default '24'" ); | |
187 } | 198 } |
188 else { | 199 else { |
189 array_push( $sqlstrs, | 200 array_push( $sqlstrs, |
190 "alter table ".$settings->tbl_prefix.KEYWORD_TBL." add prgtime enum ('0','1','2','3','4','5','6','7','8','9','10','11','12',". | 201 "alter table ".$settings->tbl_prefix.KEYWORD_TBL." add prgtime enum ('0','1','2','3','4','5','6','7','8','9','10','11','12',". |
191 "'13','14','15','16','17','18','19','20','21','22','23','24') default '24'" ); | 202 "'13','14','15','16','17','18','19','20','21','22','23','24') not null default '24'" ); |
192 } | 203 } |
193 | 204 |
194 if( multi_query( $sqlstrs, $dbh ) ) { | 205 if( multi_query( $sqlstrs, $dbh ) ) { |
195 echo "若若若≪若紊掩\n"; | 206 echo "若若若≪若紊掩\n"; |
196 } | 207 } |
197 | 208 |
198 // 違若 | 209 // 違若域鋎 |
199 | 210 |
200 try { | 211 try { |
201 $log = new DBRecord( LOG_TBL ); | 212 $log = new DBRecord( LOG_TBL ); |
202 $log->createTable( LOG_STRUCT ); | 213 $log->createTable( LOG_STRUCT ); |
203 } | 214 } |
204 catch( Exception $e ) { | 215 catch( Exception $e ) { |
205 echo $e->message; | 216 echo $e->getMessage(); |
206 echo "\n"; | 217 echo "\n"; |
207 } | 218 } |
208 | 219 |
209 } | 220 } |
210 else | 221 else |