root/trunk/install/mktable.txt

リビジョン 111, 15.4 kB (コミッタ: sorshi, コミット時期: 9 年 前)

・放送波からのEPG番組表取得に対応。
・foltia_epgテーブル構成変更
・folcast.phpがSQLiteでまったく動作していなかったのを修正

Line 
1
2 drop table  foltia_program ;
3
4 create table foltia_program (
5 tid int8 PRIMARY KEY,
6 title text ,
7 startweektype text,
8 starttime text,
9 lengthmin int8,
10 firstlight text,
11 officialuri text ,
12 aspect int8 ,
13 psp int8 ,
14 transfer text,
15 PSPdirname text
16 );
17 create unique index foltia_program_tid_index on foltia_program (tid);
18
19 REVOKE ALL on "foltia_program" from PUBLIC;
20 GRANT UPDATE,SELECT,INSERT on "foltia_program" to "foltia";
21
22 drop table  foltia_subtitle ;
23
24 create table foltia_subtitle (
25 pid int8  PRIMARY KEY,
26 tid int8,
27 stationid int8,
28 countno int8,
29 subtitle text,
30 startdatetime int8,
31 enddatetime int8,
32 startoffset int8,
33 lengthmin int8,
34 m2pfilename text ,
35 PSPfilename text ,
36 epgaddedby int8 ,
37 lastupdate timestamp,
38 filestatus int4
39 );
40 create unique index foltia_subtitle_pid_index on foltia_subtitle (pid);
41 create  index foltia_subtitle_tid_index on foltia_subtitle (tid);
42 create  index foltia_subtitle_stationid_index on foltia_subtitle (stationid);
43 create  index foltia_subtitle_enddatetime_index on foltia_subtitle (enddatetime);
44 create  index foltia_subtitle_startdatetime_index on foltia_subtitle (startdatetime);
45
46 REVOKE ALL on "foltia_subtitle" from PUBLIC;
47 GRANT UPDATE,SELECT,INSERT on "foltia_subtitle" to "foltia";
48
49 drop table foltia_tvrecord;
50 create table foltia_tvrecord (
51 tid int8  ,
52 stationid int8,
53 bitrate int8 ,
54 digital int8
55 );
56 create  index foltia_tvrecord_tid_index on foltia_tvrecord (tid);
57
58 REVOKE ALL on "foltia_tvrecord" from PUBLIC;
59 GRANT ALL on "foltia_tvrecord" to "foltia";
60
61
62 drop table foltia_epg;
63 create table foltia_epg (
64 epgid int8   PRIMARY KEY SERIAL,
65 startdatetime int8,
66 enddatetime int8,
67 lengthmin int8 ,
68 ontvchannel text,
69 epgtitle text,
70 epgdesc text,
71 epgcategory text
72 );
73 create  index foltia_epg_startdatetime_index on foltia_epg (startdatetime);
74 create  index foltia_epg_enddatetime_index on foltia_epg (enddatetime);
75 create  index foltia_epg_ontvchannel_index on foltia_epg (ontvchannel);
76
77 REVOKE ALL on "foltia_epg" from PUBLIC;
78 GRANT ALL on "foltia_epg" to "foltia";
79
80 drop table foltia_m2pfiles;
81 create table foltia_m2pfiles (
82 m2pfilename text  PRIMARY KEY
83 );
84 REVOKE ALL on "foltia_m2pfiles" from PUBLIC;
85 GRANT ALL on "foltia_m2pfiles" to "foltia";
86
87 drop table foltia_mp4files;
88 create table foltia_mp4files (
89 tid int8,
90 mp4filename text  PRIMARY KEY
91 );
92 REVOKE ALL on "foltia_mp4files" from PUBLIC;
93 GRANT ALL on "foltia_mp4files" to "foltia";
94
95 drop table foltia_station;
96 CREATE TABLE foltia_station (
97     stationid bigint  PRIMARY KEY,
98     stationname text,
99     stationrecch bigint,
100     stationcallsign text,
101     stationuri text,
102     tunertype text,
103     tunerch text,
104     device text,
105     ontvcode text,
106         digitalch bigint,
107         digitalstationband bigint
108 );
109 REVOKE ALL on "foltia_station" from PUBLIC;
110 GRANT ALL on "foltia_station" to "foltia";
111
112 --
113 -- PostgreSQL database dump
114 --
115
116 SET client_encoding = 'EUC_JP';
117 SET check_function_bodies = false;
118
119 SET SESSION AUTHORIZATION 'foltia';
120
121 SET search_path = public, pg_catalog;
122
123 --
124 -- TOC entry 3 (OID 17158)
125 -- Name: foltia_station; Type: TABLE; Schema: public; Owner: foltia
126 --
127
128 --
129 -- TOC entry 4 (OID 17158)
130 -- Name: foltia_station; Type: ACL; Schema: public; Owner: foltia
131 --
132
133
134 SET SESSION AUTHORIZATION 'foltia';
135
136 --
137 -- Data for TOC entry 6 (OID 17158)
138 -- Name: foltia_station; Type: TABLE DATA; Schema: public; Owner: foltia
139 --
140 INSERT INTO foltia_program VALUES (0, 'EPG録画', '', '', NULL, '', '', 3, 1, '', '');
141 INSERT INTO foltia_tvrecord VALUES (0,0,5,1);
142
143
144
145 INSERT INTO foltia_station VALUES (0, '[全局]', 0, '', '', '', '', '', '',NULL,NULL);
146 INSERT INTO foltia_station VALUES (1, 'NHK総合', 1, 'NHK', '', NULL, NULL, NULL, '0031.ontvjapan.com',27,0);
147 INSERT INTO foltia_station VALUES (3, 'NHK教育', 3, 'ETV', '', NULL, NULL, NULL, '0041.ontvjapan.com',26,0);
148 INSERT INTO foltia_station VALUES (4, '日本テレビ', 4, 'NTV', '', NULL, NULL, NULL, '0004.ontvjapan.com',25,0);
149 INSERT INTO foltia_station VALUES (6, 'TBS', 6, 'TBS', '', NULL, NULL, NULL, '0005.ontvjapan.com',22,0);
150 INSERT INTO foltia_station VALUES (8, 'フジテレビ', 8, 'CX', '', NULL, NULL, NULL, '0006.ontvjapan.com',21,0);
151 INSERT INTO foltia_station VALUES (10, 'テレビ朝日', 10, 'EX', '', NULL, NULL, NULL, '0007.ontvjapan.com',24,0);
152 INSERT INTO foltia_station VALUES (12, 'テレビ東京', 12, 'TX', '', NULL, NULL, NULL, '0008.ontvjapan.com',23,0);
153 INSERT INTO foltia_station VALUES (42, 'tvk', 42, 'TVK', '', '', '', '', '0009.ontvjapan.com',18,0);
154 INSERT INTO foltia_station VALUES (14, 'TOKYO MX', 14, 'MX', '', '', '', '', '0016.ontvjapan.com',20,0);
155 INSERT INTO foltia_station VALUES (46, 'チバテレビ', -10, 'CTC', '', NULL, NULL, NULL, NULL,30,0);
156 INSERT INTO foltia_station VALUES (38, 'テレ玉', -10, 'TVS', '', NULL, NULL, NULL, NULL,32,0);
157 INSERT INTO foltia_station VALUES (418, '放送大学', -10, 'UAIR', '', NULL, NULL, NULL, '0013.ontvjapan.com',28,0);
158 INSERT INTO foltia_station VALUES (101, 'NHK-BS1', 0, 'BS7', '', '', '101', '', '3001.ontvjapan.com',101,1);
159 INSERT INTO foltia_station VALUES (102, 'NHK-BS2', 0, 'BS11', '', '', '102', '', '3002.ontvjapan.com',102,1);
160 INSERT INTO foltia_station VALUES (103, 'NHK-BShi', 0, '', '', '', '103', '', '3003.ontvjapan.com',103,1);
161 INSERT INTO foltia_station VALUES (409, 'BS日テレ', 0, '', '', '', '141', '', '3004.ontvjapan.com',141,1);
162 INSERT INTO foltia_station VALUES (384, 'BS朝日', 0, '', '', '', '151', '', '3005.ontvjapan.com',151,1);
163 INSERT INTO foltia_station VALUES (161, 'BS-TBS', 0, '', '', '', '161', '', '3006.ontvjapan.com',161,1);
164 INSERT INTO foltia_station VALUES (389, 'BS Japan', 0, '', '', '', '171', '','3007.ontvjapan.com',171,1);
165 INSERT INTO foltia_station VALUES (381, 'BSフジ', 0, '', '', '', '181', '', '3008.ontvjapan.com',181,1);
166 INSERT INTO foltia_station VALUES (191, 'WOWOW', 0, 'BS5', '', '', '191', '', '3009.ontvjapan.com',191,1);
167 INSERT INTO foltia_station VALUES (420, 'WOWOW2', 0, '', '', '', '192', '', '3010.ontvjapan.com',192,1);
168 INSERT INTO foltia_station VALUES (421, 'WOWOW3', 0, '', '', '', '193', '', '3011.ontvjapan.com',193,1);
169 INSERT INTO foltia_station VALUES (468, 'BS11デジタル', 0, '', '', '', '211', '', '3013.ontvjapan.com',211,1);
170 INSERT INTO foltia_station VALUES (469, 'Twellv', 0, '', '', '', '222', '', '3014.ontvjapan.com',222,1);
171 INSERT INTO foltia_station VALUES (408, 'ファミリー劇場', 0, '', '', '', '751', '', '1015.ontvjapan.com',NULL,NULL);
172 INSERT INTO foltia_station VALUES (397, 'カートゥーンネットワーク', 0, '', '', '', '780', '', '1046.ontvjapan.com',NULL,NULL);
173 INSERT INTO foltia_station VALUES (263, 'アニマックス', 0, '', '', '', '782', '', '1047.ontvjapan.com',NULL,NULL);
174 INSERT INTO foltia_station VALUES (261, 'キッズステーション', 0, '', '', 'c', '335', '', '1045.ontvjapan.com',NULL,NULL);
175 INSERT INTO foltia_station VALUES (449, 'ディスカバリーチャンネル', 0, '', '', '', '796', '', '1062.ontvjapan.com',NULL,NULL);
176 INSERT INTO foltia_station VALUES (448, 'MONDO21', 0, '', '', '', '722', '', '1049.ontvjapan.com',NULL,NULL);
177 INSERT INTO foltia_station VALUES (401, 'チャンネルNECO', 0, '', '', '', '750', '', '1008.ontvjapan.com',NULL,NULL);
178 INSERT INTO foltia_station VALUES (455, '330ch WOWOW', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
179 INSERT INTO foltia_station VALUES (480, 'TBSラジオ(954)', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
180 INSERT INTO foltia_station VALUES (477, '北海道文化放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
181 INSERT INTO foltia_station VALUES (463, 'gooアニメ', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
182 INSERT INTO foltia_station VALUES (461, '@nifty', -10, '', '', '', '', '', '',NULL,NULL);
183 INSERT INTO foltia_station VALUES (466, 'NHKラジオ第一', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
184 INSERT INTO foltia_station VALUES (474, '日テレプラス', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
185 INSERT INTO foltia_station VALUES (476, 'ニコニコアニメチャンネル', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
186 INSERT INTO foltia_station VALUES (451, 'RKB毎日放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
187 INSERT INTO foltia_station VALUES (452, '北海道放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
188 INSERT INTO foltia_station VALUES (454, 'テレビ和歌山', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
189 INSERT INTO foltia_station VALUES (456, '静岡放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
190 INSERT INTO foltia_station VALUES (457, 'i-revo', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
191 INSERT INTO foltia_station VALUES (459, '東北放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
192 INSERT INTO foltia_station VALUES (464, 'テレビ山口', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
193 INSERT INTO foltia_station VALUES (478, '札幌テレビ放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
194 INSERT INTO foltia_station VALUES (395, 'カミングスーンTV', -10, '', '', '', '', '', '',NULL,NULL);
195 INSERT INTO foltia_station VALUES (443, 'スーパーチャンネル', -10, '', '', '', '', '', '',NULL,NULL);
196 INSERT INTO foltia_station VALUES (385, 'TBSチャンネル', 0, '', '', '', '765', '', '',NULL,NULL);
197 INSERT INTO foltia_station VALUES (462, '瀬戸内海放送', -10, '', '', '', '', '', '',NULL,NULL);
198 INSERT INTO foltia_station VALUES (473, 'フジCSHD', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
199 INSERT INTO foltia_station VALUES (475, 'スカパー181ch', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
200 INSERT INTO foltia_station VALUES (479, '北海道テレビ放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
201 INSERT INTO foltia_station VALUES (450, 'NHK教育3', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
202 INSERT INTO foltia_station VALUES (453, 'バンダイチャンネルキッズ', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
203 INSERT INTO foltia_station VALUES (458, '日テレプラス&サイエンス', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
204 INSERT INTO foltia_station VALUES (460, 'ビクトリーチャンネル', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
205 INSERT INTO foltia_station VALUES (472, 'ytv', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
206 INSERT INTO foltia_station VALUES (422, '東海テレビ', -10, '', '', '', '', '', '',NULL,NULL);
207 INSERT INTO foltia_station VALUES (423, 'ShowTime', -10, '', '', '', '', '', '',NULL,NULL);
208 INSERT INTO foltia_station VALUES (424, 'メ〜テレ', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
209 INSERT INTO foltia_station VALUES (425, '三重テレビ', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
210 INSERT INTO foltia_station VALUES (426, '中京テレビ', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
211 INSERT INTO foltia_station VALUES (293, 'AT-X', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
212 INSERT INTO foltia_station VALUES (295, 'フジ721', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
213 INSERT INTO foltia_station VALUES (380, 'スカパー180ch', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
214 INSERT INTO foltia_station VALUES (427, '岐阜放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
215 INSERT INTO foltia_station VALUES (428, 'テレビ新広島', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
216 INSERT INTO foltia_station VALUES (383, 'サンテレビ', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
217 INSERT INTO foltia_station VALUES (429, 'CBCテレビ', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
218 INSERT INTO foltia_station VALUES (386, 'テレ朝チャンネル', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
219 INSERT INTO foltia_station VALUES (390, 'サンテレビジョン', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
220 INSERT INTO foltia_station VALUES (392, 'スカパー183ch', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
221 INSERT INTO foltia_station VALUES (394, 'スカパー160ch', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
222 INSERT INTO foltia_station VALUES (396, 'KBS京都', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
223 INSERT INTO foltia_station VALUES (398, 'テレビ大阪', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
224 INSERT INTO foltia_station VALUES (399, 'ABCテレビ', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
225 INSERT INTO foltia_station VALUES (400, 'なし', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
226 INSERT INTO foltia_station VALUES (402, '関西テレビ', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
227 INSERT INTO foltia_station VALUES (406, 'MBS毎日放送', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
228 INSERT INTO foltia_station VALUES (407, 'animate.tv', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
229 INSERT INTO foltia_station VALUES (410, 'テレビ愛知', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
230 INSERT INTO foltia_station VALUES (411, 'インターネット', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
231 INSERT INTO foltia_station VALUES (413, 'よみうりテレビ', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
232 INSERT INTO foltia_station VALUES (414, 'LFX488', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
233 INSERT INTO foltia_station VALUES (415, 'LFX', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
234 INSERT INTO foltia_station VALUES (416, 'LFX BB', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
235 INSERT INTO foltia_station VALUES (419, 'GyaO', -10, '', '', NULL, NULL, NULL, NULL,NULL,NULL);
236 INSERT INTO foltia_station VALUES (417, 'とちぎテレビ', -10, 'TTV', '', NULL, NULL, NULL, NULL,NULL,NULL);
237 INSERT INTO foltia_station VALUES (412, '群馬テレビ', -10, 'GTV', '', NULL, NULL, NULL, NULL,NULL,NULL);
238 INSERT INTO foltia_station VALUES (430, '奈良テレビ', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
239 INSERT INTO foltia_station VALUES (431, 'TVQ九州放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
240 INSERT INTO foltia_station VALUES (432, 'テレビ北海道', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
241 INSERT INTO foltia_station VALUES (433, 'BIGLOBEストリーム', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
242 INSERT INTO foltia_station VALUES (434, 'テレビせとうち', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
243 INSERT INTO foltia_station VALUES (435, '中国放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
244 INSERT INTO foltia_station VALUES (436, '文化放送(1134)', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
245 INSERT INTO foltia_station VALUES (437, '広島ホームテレビ', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
246 INSERT INTO foltia_station VALUES (438, '広島テレビ', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
247 INSERT INTO foltia_station VALUES (439, '岡山放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
248 INSERT INTO foltia_station VALUES (440, '山陽放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
249 INSERT INTO foltia_station VALUES (441, 'びわ湖放送', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
250 INSERT INTO foltia_station VALUES (442, 'NHK-FM', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
251 INSERT INTO foltia_station VALUES (444, 'バンダイチャンネル', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
252 INSERT INTO foltia_station VALUES (445, 'フレッツ・スクウェア(NTT東日本)', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
253 INSERT INTO foltia_station VALUES (446, 'フジ739', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
254 INSERT INTO foltia_station VALUES (447, 'Yahoo!動画', -10, NULL, NULL, NULL, NULL, NULL, NULL,NULL,NULL);
255
256
257
258
259 --
260 -- TOC entry 5 (OID 17163)
261 -- Name: foltia_station_pkey; Type: CONSTRAINT; Schema: public; Owner: foltia
262 --
263
264 ALTER TABLE ONLY foltia_station
265     ADD CONSTRAINT foltia_station_pkey PRIMARY KEY (stationid);
266
267 drop table foltia_envpolicy;
268 CREATE TABLE foltia_envpolicy (
269 memberid bigint  PRIMARY KEY,
270 userclass bigint,
271 name text,
272 passwd1 text ,
273 adddate timestamp,
274 remotehost text
275 );
276 REVOKE ALL on "foltia_envpolicy" from PUBLIC;
277 GRANT ALL on "foltia_envpolicy" to "foltia";
278 create  index foltia_envpolicy_index on foltia_envpolicy (name);
279 insert into foltia_envpolicy  values ( '0','0','foltia','foltiapasswd',now(),'');
280
281
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。
track feed