OSDN Git Service

new file: epgrec_upgrade.php
authorSushi-k <epgrec@park.mda.or.jp>
Thu, 16 Jul 2009 07:52:54 +0000 (16:52 +0900)
committerSushi-k <epgrec@park.mda.or.jp>
Thu, 16 Jul 2009 07:52:54 +0000 (16:52 +0900)
epgrec_upgrade.php [new file with mode: 0755]

diff --git a/epgrec_upgrade.php b/epgrec_upgrade.php
new file mode 100755 (executable)
index 0000000..b506f44
--- /dev/null
@@ -0,0 +1,29 @@
+#!/usr/bin/php
+<?php
+include_once('config.php');
+
+ $dbh = mysql_connect( DB_HOST, DB_USER, DB_PASS );
+ if( $dbh !== false ) {
+       
+       $sqlstr = "use ".DB_NAME;
+       mysql_query( $sqlstr );
+       
+       $sqlstr = "set NAMES 'utf8'";
+       mysql_query( $sqlstr );
+       
+       // RESERVE_TBL
+       // description -> text
+       $sqlstr = "alter table ".TBL_PREFIX.RESERVE_TBL." modify description text default null;";
+       mysql_query( $sqlstr );
+       // path -> blob
+       $sqlstr = "alter table ".TBL_PREFIX.RESERVE_TBL." modify path blob default null;";
+       mysql_query( $sqlstr );
+       
+       // PROGRAM_TBL
+       // descripton -> text
+       $sqlstr = "alter table ".TBL_PREFIX.PROGRAM_TBL." modify description text default null;";
+       mysql_query( $sqlstr );
+ }
+ else exit( "Can't connect DB\n");
+
+?>
\ No newline at end of file