Mercurial > epgrec.yaz
changeset 20:9ab4184561d9
new file: epgrec_upgrade.php
author | Sushi-k <epgrec@park.mda.or.jp> |
---|---|
date | Thu, 16 Jul 2009 16:52:54 +0900 |
parents | 9648e3af1777 |
children | 19bd80c60009 |
files | epgrec_upgrade.php |
diffstat | 1 files changed, 29 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epgrec_upgrade.php Thu Jul 16 16:52:54 2009 +0900 @@ -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