changeset 114:f854f6606fa5

mod: DBテーブル構造をconfig.phpから切り離した
author yoneda <epgrec@park.mda.or.jp>
date Sat, 13 Mar 2010 21:37:27 +0900
parents 3bed74eca373
children 7a64d5e3baee
files config.php.sample install/step3.php tableStruct.inc.php
diffstat 3 files changed, 84 insertions(+), 72 deletions(-) [+]
line wrap: on
line diff
--- a/config.php.sample	Sat Mar 13 16:45:29 2010 +0900
+++ b/config.php.sample	Sat Mar 13 21:37:27 2010 +0900
@@ -223,76 +223,5 @@
 define( "CATEGORY_TBL", "categoryTbl" );					// 眼若
 define( "KEYWORD_TBL", "keywordTbl" );						// 若若若
 
-// 篋膣若
-define( "RESERVE_STRUCT", 
-	"id integer not null auto_increment primary key,".		// ID
-	"channel_disc varchar(128) not null default 'none',".	// channel disc
-	"channel_id integer not null  default '0',".			// channel ID
-	"program_id integer not null default '0',".				// Program ID
-	"type varchar(8) not null default 'GR',".				// 腮ワGR/BS/CS鐚
-	"channel varchar(10) not null default '0',".			// c潟
-	"title varchar(512) not null default 'none',".			// 帥ゃ
-	"description varchar(512) not null default 'none',".	// 茯 text->varchar
-	"category_id integer not null default '0',".			// 眼ID
-	"starttime datetime not null default '1970-01-01 00:00:00',".	// 紮
-	"endtime datetime not null default '1970-01-01 00:00:00',".		// 腟篋
-	"job integer not null default '0',".					// job
-	"path blob default null,".								// 牙祉<ゃ
-	"complete boolean not null default '0',".				// 絎篋
-	"reserve_disc varchar(128) not null default 'none',".	// 茘ョhash
-	"autorec integer not null default '0',".				// 若若ID
-	"mode integer not null default '0',".						//牙祉≪若
-	"index reserve_ch_idx (channel_disc),".			// ゃ潟
-	"index reserve_st_idx (starttime)".
-	""
-);
 
-
-// 腟茵若
-define( "PROGRAM_STRUCT",
-	"id integer not null auto_increment primary key,".		// ID
-	"channel_disc varchar(128) not null default 'none',".	// channel disc
-	"channel_id integer not null default '0',".				// channel ID
-	"type varchar(8) not null default 'GR',".				// 腮ワGR/BS/CS鐚
-	"channel varchar(10) not null default '0',".			// c潟
-	"title varchar(512) not null default 'none',".			// 帥ゃ
-	"description varchar(512) not null default 'none',".	// 茯 text->varchar
-	"category_id integer not null default '0',".			// 眼ID
-	"starttime datetime not null default '1970-01-01 00:00:00',".	// 紮
-	"endtime datetime not null default '1970-01-01 00:00:00',".		// 腟篋
-	"program_disc varchar(128) not null default 'none',".	 		// 茘ョhash
-	"autorec boolean not null default '1',".					// 牙紙合≦
-	"index program_ch_idx (channel_disc),".			// ゃ潟
-	"index program_st_idx (starttime)".
-	""
-);
-
-
-define( "CHANNEL_STRUCT",
-	"id integer not null auto_increment primary key,".		// ID
-	"type varchar(8) not null default 'GR',".				// 腮
-	"channel varchar(10) not null default '0',".			// channel
-	"name varchar(512) not null default 'none',".			// 茵腓阪
-	"channel_disc varchar(128) not null default 'none',".	// 茘ョhash
-	"sid varchar(64) not null default 'hd'"					// 泣若ID02/23/2010菴遵
-);
-
-define( "CATEGORY_STRUCT",
-	"id integer not null auto_increment primary key,".		// ID
-	"name_jp varchar(512) not null default 'none',".		// 茵腓阪
-	"name_en varchar(512) not null default 'none',".		// 筝
-	"category_disc varchar(128) not null default 'none'"	// 茘ョhash
-);
-
-
-define( "KEYWORD_STRUCT",
-	"id integer not null auto_increment primary key,".		// ID
-	"keyword varchar(512) not null default '*',".			// 茵腓阪
-	"type varchar(8) not null default '*',".				// 腮
-	"channel_id integer not null default '0',".				// channel ID
-	"category_id integer not null default '0',".			// 眼ID
-	"use_regexp boolean not null default '0',".				// 罩h頫憗篏睡1
-	"autorec_mode integer not null default '0',".						// 牙祉≪若02/23/2010菴遵
-	"weekofday enum ('0','1','2','3','4','5','6','7' ) default '7'"		// ャ菴遵
-);
-?>
+?>
\ No newline at end of file
--- a/install/step3.php	Sat Mar 13 16:45:29 2010 +0900
+++ b/install/step3.php	Sat Mar 13 21:37:27 2010 +0900
@@ -4,6 +4,7 @@
 include_once("../DBRecord.class.php");
 include_once("../Settings.class.php");
 include_once("../reclib.php" );
+include_once("../tableStruct.inc.php");
 
 $settings = Settings::factory();
 $settings->post();	// c篆絖
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tableStruct.inc.php	Sat Mar 13 21:37:27 2010 +0900
@@ -0,0 +1,82 @@
+<?php
+// 若帥若鴻若絎臂
+
+
+// 篋膣若
+define( "RESERVE_STRUCT", 
+	"id integer not null auto_increment primary key,".				// ID
+	"channel_disc varchar(128) not null default 'none',".			// channel disc
+	"channel_id integer not null  default '0',".					// channel ID
+	"program_id integer not null default '0',".						// Program ID
+	"type varchar(8) not null default 'GR',".						// 腮ワGR/BS/CS鐚
+	"channel varchar(10) not null default '0',".					// c潟
+	"title varchar(512) not null default 'none',".					// 帥ゃ
+	"description varchar(512) not null default 'none',".			// 茯 text->varchar
+	"category_id integer not null default '0',".					// 眼ID
+	"starttime datetime not null default '1970-01-01 00:00:00',".	// 紮
+	"endtime datetime not null default '1970-01-01 00:00:00',".		// 腟篋
+	"job integer not null default '0',".							// job
+	"path blob default null,".										// 牙祉<ゃ
+	"complete boolean not null default '0',".						// 絎篋
+	"reserve_disc varchar(128) not null default 'none',".			// 茘ョhash
+	"autorec integer not null default '0',".						// 若若ID
+	"mode integer not null default '0',".							//牙祉≪若
+	"index reserve_ch_idx (channel_disc),".							// ゃ潟
+	"index reserve_st_idx (starttime)".
+	""
+);
+
+
+// 腟茵若
+define( "PROGRAM_STRUCT",
+	"id integer not null auto_increment primary key,".				// ID
+	"channel_disc varchar(128) not null default 'none',".			// channel disc
+	"channel_id integer not null default '0',".						// channel ID
+	"type varchar(8) not null default 'GR',".						// 腮ワGR/BS/CS鐚
+	"channel varchar(10) not null default '0',".					// c潟
+	"title varchar(512) not null default 'none',".					// 帥ゃ
+	"description varchar(512) not null default 'none',".			// 茯 text->varchar
+	"category_id integer not null default '0',".					// 眼ID
+	"starttime datetime not null default '1970-01-01 00:00:00',".	// 紮
+	"endtime datetime not null default '1970-01-01 00:00:00',".		// 腟篋
+	"program_disc varchar(128) not null default 'none',".	 		// 茘ョhash
+	"autorec boolean not null default '1',".						// 牙紙合≦
+	"index program_ch_idx (channel_disc),".							// ゃ潟
+	"index program_st_idx (starttime)".
+	""
+);
+
+
+define( "CHANNEL_STRUCT",
+	"id integer not null auto_increment primary key,".				// ID
+	"type varchar(8) not null default 'GR',".						// 腮
+	"channel varchar(10) not null default '0',".					// channel
+	"name varchar(512) not null default 'none',".					// 茵腓阪
+	"channel_disc varchar(128) not null default 'none',".			// 茘ョhash
+	"sid varchar(64) not null default 'hd',".						// 泣若ID02/23/2010菴遵
+	"skip boolean not null default '0'".							// c潟鴻03/13/2010菴遵
+	""
+);
+
+define( "CATEGORY_STRUCT",
+	"id integer not null auto_increment primary key,".				// ID
+	"name_jp varchar(512) not null default 'none',".				// 茵腓阪
+	"name_en varchar(512) not null default 'none',".				// 筝
+	"category_disc varchar(128) not null default 'none'"			// 茘ョhash
+);
+
+
+define( "KEYWORD_STRUCT",
+	"id integer not null auto_increment primary key,".				// ID
+	"keyword varchar(512) not null default '*',".					// 茵腓阪
+	"type varchar(8) not null default '*',".						// 腮
+	"channel_id integer not null default '0',".						// channel ID
+	"category_id integer not null default '0',".					// 眼ID
+	"use_regexp boolean not null default '0',".						// 罩h頫憗篏睡1
+	"autorec_mode integer not null default '0',".					// 牙祉≪若02/23/2010菴遵
+	"weekofday enum ('0','1','2','3','4','5','6','7' ) default '7'".// ャ菴遵
+	",prgtime enum ('0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24') default '24'".	// 03/13/2010菴遵
+	""
+);
+
+?>
\ No newline at end of file