view epgrec_upgrade.php @ 47:a701aaf6d216

add: gen-thumbnail.sh
author Sushi-k <epgrec@park.mda.or.jp>
date Tue, 28 Jul 2009 18:48:32 +0900
parents e5f9aa34d06f
children
line wrap: on
line source

#!/usr/bin/php
<?php
include_once('config.php');
include_once(INSTALL_PATH . '/Settings.class.php' );

$settings = Settings::factory();

 $dbh = mysql_connect( $settings->db_host, $settings->db_user, $settings->db_pass );
 if( $dbh !== false ) {
	
	$sqlstr = "use ".$settings->db_name;
	mysql_query( $sqlstr );
	
	$sqlstr = "set NAMES 'utf8'";
	mysql_query( $sqlstr );
	
	// RESERVE_TBL
	// description -> text
	$sqlstr = "alter table ".RESERVE_TBL." modify description text default null;";
	mysql_query( $sqlstr );
	// path -> blob
	$sqlstr = "alter table ".RESERVE_TBL." modify path blob default null;";
	mysql_query( $sqlstr );
	
	// PROGRAM_TBL
	// descripton -> text
	$sqlstr = "alter table ".PROGRAM_TBL." modify description text default null;";
	mysql_query( $sqlstr );
 }
 else exit( "Can't connect DB\n");

?>