postgresql_update_tf-b4rt-98.to.torrentflux-b4rt-1.0.sql 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. -- -----------------------------------------------------------------------------
  2. -- $Id: postgresql_update_tf-b4rt-98.to.torrentflux-b4rt-1.0.sql 2952 2007-04-25 18:03:00Z b4rt $
  3. -- -----------------------------------------------------------------------------
  4. --
  5. -- This Stuff is provided 'as-is'. In no way will the authors be held
  6. -- liable for any damages to your soft- or hardware from this.
  7. -- -----------------------------------------------------------------------------
  8. --
  9. -- begin transaction
  10. --
  11. BEGIN;
  12. --
  13. -- tf_transfers
  14. --
  15. DROP TABLE tf_torrents;
  16. CREATE TABLE tf_transfers (
  17. transfer VARCHAR(255) NOT NULL DEFAULT '',
  18. type VARCHAR(32) NOT NULL DEFAULT 'torrent',
  19. client VARCHAR(32) NOT NULL DEFAULT 'tornado',
  20. hash VARCHAR(40) DEFAULT '' NOT NULL,
  21. datapath VARCHAR(255) NOT NULL DEFAULT '',
  22. savepath VARCHAR(255) NOT NULL DEFAULT '',
  23. running SMALLINT NOT NULL DEFAULT '0',
  24. rate INTEGER NOT NULL DEFAULT '0',
  25. drate INTEGER NOT NULL DEFAULT '0',
  26. maxuploads SMALLINT NOT NULL DEFAULT '0',
  27. superseeder SMALLINT NOT NULL DEFAULT '0',
  28. runtime VARCHAR(5) NOT NULL DEFAULT 'False',
  29. sharekill INTEGER NOT NULL DEFAULT '0',
  30. minport INTEGER NOT NULL DEFAULT '0',
  31. maxport INTEGER NOT NULL DEFAULT '0',
  32. maxcons INTEGER NOT NULL DEFAULT '0',
  33. rerequest INTEGER NOT NULL DEFAULT '0',
  34. PRIMARY KEY (transfer),
  35. CHECK (running>=0),
  36. CHECK (maxuploads>=0),
  37. CHECK (minport>=0),
  38. CHECK (maxport>=0),
  39. CHECK (maxcons>=0),
  40. CHECK (rerequest>=0)
  41. );
  42. --
  43. -- tf_transfer_totals
  44. --
  45. DROP TABLE tf_torrent_totals;
  46. CREATE TABLE tf_transfer_totals (
  47. tid VARCHAR(40) NOT NULL DEFAULT '',
  48. uptotal BIGINT NOT NULL DEFAULT '0',
  49. downtotal BIGINT NOT NULL DEFAULT '0',
  50. PRIMARY KEY (tid)
  51. );
  52. --
  53. -- Sequences for table tf_trprofiles
  54. --
  55. CREATE SEQUENCE tf_trprofiles_id_seq;
  56. --
  57. -- tf_trprofiles
  58. --
  59. CREATE TABLE tf_trprofiles (
  60. id INTEGER DEFAULT nextval('tf_trprofiles_id_seq'),
  61. name VARCHAR(255) NOT NULL DEFAULT '',
  62. owner INTEGER NOT NULL DEFAULT '0',
  63. public SMALLINT NOT NULL DEFAULT '0',
  64. rate INTEGER NOT NULL DEFAULT '0',
  65. drate INTEGER NOT NULL DEFAULT '0',
  66. maxuploads SMALLINT NOT NULL DEFAULT '0',
  67. superseeder SMALLINT NOT NULL DEFAULT '0',
  68. runtime VARCHAR(5) NOT NULL DEFAULT 'False',
  69. sharekill INTEGER NOT NULL DEFAULT '0',
  70. minport INTEGER NOT NULL DEFAULT '0',
  71. maxport INTEGER NOT NULL DEFAULT '0',
  72. maxcons INTEGER NOT NULL DEFAULT '0',
  73. rerequest INTEGER NOT NULL DEFAULT '0',
  74. PRIMARY KEY (id),
  75. CHECK (public>=0),
  76. CHECK (maxuploads>=0),
  77. CHECK (minport>=0),
  78. CHECK (maxport>=0),
  79. CHECK (maxcons>=0),
  80. CHECK (rerequest>=0)
  81. );
  82. --
  83. -- tf_settings_dir
  84. --
  85. CREATE TABLE tf_settings_dir (
  86. tf_key VARCHAR(255) NOT NULL DEFAULT '',
  87. tf_value TEXT DEFAULT '' NOT NULL,
  88. PRIMARY KEY (tf_key)
  89. );
  90. INSERT INTO tf_settings_dir VALUES ('dir_public_read','1');
  91. INSERT INTO tf_settings_dir VALUES ('dir_public_write','0');
  92. INSERT INTO tf_settings_dir VALUES ('dir_enable_chmod','1');
  93. INSERT INTO tf_settings_dir VALUES ('enable_dirstats','1');
  94. INSERT INTO tf_settings_dir VALUES ('enable_maketorrent','1');
  95. INSERT INTO tf_settings_dir VALUES ('dir_maketorrent_default','tornado');
  96. INSERT INTO tf_settings_dir VALUES ('enable_file_download','1');
  97. INSERT INTO tf_settings_dir VALUES ('enable_view_nfo','1');
  98. INSERT INTO tf_settings_dir VALUES ('package_type','tar');
  99. INSERT INTO tf_settings_dir VALUES ('enable_sfvcheck','1');
  100. INSERT INTO tf_settings_dir VALUES ('enable_rar','1');
  101. INSERT INTO tf_settings_dir VALUES ('enable_move','0');
  102. INSERT INTO tf_settings_dir VALUES ('enable_rename','1');
  103. INSERT INTO tf_settings_dir VALUES ('move_paths','');
  104. INSERT INTO tf_settings_dir VALUES ('dir_restricted','lost+found:CVS:Temporary Items:Network Trash Folder:TheVolumeSettingsFolder');
  105. INSERT INTO tf_settings_dir VALUES ('enable_vlc','1');
  106. INSERT INTO tf_settings_dir VALUES ('vlc_port','8080');
  107. --
  108. -- tf_settings_stats
  109. --
  110. CREATE TABLE tf_settings_stats (
  111. tf_key VARCHAR(255) NOT NULL DEFAULT '',
  112. tf_value TEXT DEFAULT '' NOT NULL,
  113. PRIMARY KEY (tf_key)
  114. );
  115. INSERT INTO tf_settings_stats VALUES ('stats_enable_public','0');
  116. INSERT INTO tf_settings_stats VALUES ('stats_show_usage','1');
  117. INSERT INTO tf_settings_stats VALUES ('stats_deflate_level','9');
  118. INSERT INTO tf_settings_stats VALUES ('stats_txt_delim',';');
  119. INSERT INTO tf_settings_stats VALUES ('stats_default_header','0');
  120. INSERT INTO tf_settings_stats VALUES ('stats_default_type','all');
  121. INSERT INTO tf_settings_stats VALUES ('stats_default_format','xml');
  122. INSERT INTO tf_settings_stats VALUES ('stats_default_attach','0');
  123. INSERT INTO tf_settings_stats VALUES ('stats_default_compress','0');
  124. --
  125. -- alter
  126. --
  127. ALTER TABLE tf_users ADD state SMALLINT NOT NULL DEFAULT '1';
  128. --
  129. -- updates
  130. --
  131. UPDATE tf_users SET theme = 'default';
  132. --
  133. -- deletes + inserts
  134. --
  135. DELETE FROM tf_settings_user;
  136. DELETE FROM tf_settings WHERE tf_key NOT LIKE 'path';
  137. INSERT INTO tf_settings VALUES ('max_upload_rate','10');
  138. INSERT INTO tf_settings VALUES ('max_download_rate','0');
  139. INSERT INTO tf_settings VALUES ('max_uploads','4');
  140. INSERT INTO tf_settings VALUES ('minport','49160');
  141. INSERT INTO tf_settings VALUES ('maxport','49300');
  142. INSERT INTO tf_settings VALUES ('superseeder','0');
  143. INSERT INTO tf_settings VALUES ('rerequest_interval','1800');
  144. INSERT INTO tf_settings VALUES ('enable_search','1');
  145. INSERT INTO tf_settings VALUES ('show_server_load','1');
  146. INSERT INTO tf_settings VALUES ('loadavg_path','/proc/loadavg');
  147. INSERT INTO tf_settings VALUES ('days_to_keep','30');
  148. INSERT INTO tf_settings VALUES ('minutes_to_keep','3');
  149. INSERT INTO tf_settings VALUES ('rss_cache_min','20');
  150. INSERT INTO tf_settings VALUES ('page_refresh','60');
  151. INSERT INTO tf_settings VALUES ('default_theme','default');
  152. INSERT INTO tf_settings VALUES ('default_language','lang-english.php');
  153. INSERT INTO tf_settings VALUES ('debug_sql','1');
  154. INSERT INTO tf_settings VALUES ('die_when_done','False');
  155. INSERT INTO tf_settings VALUES ('sharekill','0');
  156. INSERT INTO tf_settings VALUES ('pythonCmd','/usr/bin/python');
  157. INSERT INTO tf_settings VALUES ('searchEngine','TorrentSpy');
  158. INSERT INTO tf_settings VALUES ('TorrentSpyGenreFilter','a:1:{i:0;s:0:\"\";}');
  159. INSERT INTO tf_settings VALUES ('TorrentBoxGenreFilter','a:1:{i:0;s:0:\"\";}');
  160. INSERT INTO tf_settings VALUES ('TorrentPortalGenreFilter','a:1:{i:0;s:0:\"\";}');
  161. INSERT INTO tf_settings VALUES ('enable_metafile_download','1');
  162. INSERT INTO tf_settings VALUES ('enable_file_priority','1');
  163. INSERT INTO tf_settings VALUES ('searchEngineLinks','a:5:{s:7:\"isoHunt\";s:11:\"isohunt.com\";s:7:\"NewNova\";s:11:\"newnova.org\";s:10:\"TorrentBox\";s:14:\"torrentbox.com\";s:13:\"TorrentPortal\";s:17:\"torrentportal.com\";s:10:\"TorrentSpy\";s:14:\"torrentspy.com\";}');
  164. INSERT INTO tf_settings VALUES ('maxcons','40');
  165. INSERT INTO tf_settings VALUES ('showdirtree','1');
  166. INSERT INTO tf_settings VALUES ('maxdepth','0');
  167. INSERT INTO tf_settings VALUES ('enable_multiops','1');
  168. INSERT INTO tf_settings VALUES ('enable_wget','2');
  169. INSERT INTO tf_settings VALUES ('enable_multiupload','1');
  170. INSERT INTO tf_settings VALUES ('enable_xfer','1');
  171. INSERT INTO tf_settings VALUES ('enable_public_xfer','1');
  172. INSERT INTO tf_settings VALUES ('bin_grep','/bin/grep');
  173. INSERT INTO tf_settings VALUES ('bin_netstat','/bin/netstat');
  174. INSERT INTO tf_settings VALUES ('bin_php','/usr/bin/php');
  175. INSERT INTO tf_settings VALUES ('bin_awk','/usr/bin/awk');
  176. INSERT INTO tf_settings VALUES ('bin_du','/usr/bin/du');
  177. INSERT INTO tf_settings VALUES ('bin_wget','/usr/bin/wget');
  178. INSERT INTO tf_settings VALUES ('bin_unrar','/usr/bin/unrar');
  179. INSERT INTO tf_settings VALUES ('bin_unzip','/usr/bin/unzip');
  180. INSERT INTO tf_settings VALUES ('bin_cksfv','/usr/bin/cksfv');
  181. INSERT INTO tf_settings VALUES ('bin_uudeview','/usr/local/bin/uudeview');
  182. INSERT INTO tf_settings VALUES ('btclient','tornado');
  183. INSERT INTO tf_settings VALUES ('btclient_tornado_options','');
  184. INSERT INTO tf_settings VALUES ('btclient_transmission_bin','/usr/local/bin/transmissioncli');
  185. INSERT INTO tf_settings VALUES ('btclient_transmission_options','');
  186. INSERT INTO tf_settings VALUES ('metainfoclient','btshowmetainfo.py');
  187. INSERT INTO tf_settings VALUES ('enable_restrictivetview','1');
  188. INSERT INTO tf_settings VALUES ('perlCmd','/usr/bin/perl');
  189. INSERT INTO tf_settings VALUES ('ui_displayfluxlink','1');
  190. INSERT INTO tf_settings VALUES ('ui_dim_main_w','900');
  191. INSERT INTO tf_settings VALUES ('enable_bigboldwarning','1');
  192. INSERT INTO tf_settings VALUES ('enable_goodlookstats','1');
  193. INSERT INTO tf_settings VALUES ('ui_displaylinks','1');
  194. INSERT INTO tf_settings VALUES ('ui_displayusers','1');
  195. INSERT INTO tf_settings VALUES ('xfer_total','0');
  196. INSERT INTO tf_settings VALUES ('xfer_month','0');
  197. INSERT INTO tf_settings VALUES ('xfer_week','0');
  198. INSERT INTO tf_settings VALUES ('xfer_day','0');
  199. INSERT INTO tf_settings VALUES ('enable_bulkops','1');
  200. INSERT INTO tf_settings VALUES ('week_start','Monday');
  201. INSERT INTO tf_settings VALUES ('month_start','1');
  202. INSERT INTO tf_settings VALUES ('hack_multiupload_rows','6');
  203. INSERT INTO tf_settings VALUES ('hack_goodlookstats_settings','63');
  204. INSERT INTO tf_settings VALUES ('enable_dereferrer','1');
  205. INSERT INTO tf_settings VALUES ('auth_type','0');
  206. INSERT INTO tf_settings VALUES ('index_page_connections','1');
  207. INSERT INTO tf_settings VALUES ('index_page_stats','1');
  208. INSERT INTO tf_settings VALUES ('index_page_sortorder','dd');
  209. INSERT INTO tf_settings VALUES ('index_page_settings','1266');
  210. INSERT INTO tf_settings VALUES ('bin_sockstat','/usr/bin/sockstat');
  211. INSERT INTO tf_settings VALUES ('nice_adjust','0');
  212. INSERT INTO tf_settings VALUES ('xfer_realtime','1');
  213. INSERT INTO tf_settings VALUES ('skiphashcheck','0');
  214. INSERT INTO tf_settings VALUES ('enable_umask','0');
  215. INSERT INTO tf_settings VALUES ('enable_sorttable','1');
  216. INSERT INTO tf_settings VALUES ('drivespacebar','tf');
  217. INSERT INTO tf_settings VALUES ('bin_vlc','/usr/local/bin/vlc');
  218. INSERT INTO tf_settings VALUES ('debuglevel','0');
  219. INSERT INTO tf_settings VALUES ('docroot','/var/www/');
  220. INSERT INTO tf_settings VALUES ('enable_index_ajax_update_silent','0');
  221. INSERT INTO tf_settings VALUES ('enable_index_ajax_update_users','1');
  222. INSERT INTO tf_settings VALUES ('wget_ftp_pasv','0');
  223. INSERT INTO tf_settings VALUES ('wget_limit_retries','3');
  224. INSERT INTO tf_settings VALUES ('wget_limit_rate','0');
  225. INSERT INTO tf_settings VALUES ('enable_index_ajax_update_title','1');
  226. INSERT INTO tf_settings VALUES ('enable_index_ajax_update_list','1');
  227. INSERT INTO tf_settings VALUES ('enable_index_meta_refresh','0');
  228. INSERT INTO tf_settings VALUES ('enable_index_ajax_update','0');
  229. INSERT INTO tf_settings VALUES ('index_ajax_update','10');
  230. INSERT INTO tf_settings VALUES ('transferStatsType','ajax');
  231. INSERT INTO tf_settings VALUES ('transferStatsUpdate','5');
  232. INSERT INTO tf_settings VALUES ('auth_basic_realm','torrentflux-b4rt');
  233. INSERT INTO tf_settings VALUES ('servermon_update','5');
  234. INSERT INTO tf_settings VALUES ('enable_home_dirs','1');
  235. INSERT INTO tf_settings VALUES ('path_incoming','incoming');
  236. INSERT INTO tf_settings VALUES ('enable_tmpl_cache','0');
  237. INSERT INTO tf_settings VALUES ('btclient_mainline_options','');
  238. INSERT INTO tf_settings VALUES ('bandwidthbar','tf');
  239. INSERT INTO tf_settings VALUES ('display_seeding_time','1');
  240. INSERT INTO tf_settings VALUES ('ui_displaybandwidthbars','1');
  241. INSERT INTO tf_settings VALUES ('bandwidth_down','10240');
  242. INSERT INTO tf_settings VALUES ('bandwidth_up','10240');
  243. INSERT INTO tf_settings VALUES ('webapp_locked','0');
  244. INSERT INTO tf_settings VALUES ('enable_btclient_chooser','1');
  245. INSERT INTO tf_settings VALUES ('transfer_profiles','3');
  246. INSERT INTO tf_settings VALUES ('transfer_customize_settings','2');
  247. INSERT INTO tf_settings VALUES ('transferHosts','0');
  248. INSERT INTO tf_settings VALUES ('pagetitle','torrentflux-b4rt');
  249. INSERT INTO tf_settings VALUES ('enable_sharekill','1');
  250. INSERT INTO tf_settings VALUES ('transfer_window_default','transferStats');
  251. INSERT INTO tf_settings VALUES ('index_show_seeding','1');
  252. INSERT INTO tf_settings VALUES ('enable_personal_settings','1');
  253. INSERT INTO tf_settings VALUES ('enable_nzbperl','0');
  254. INSERT INTO tf_settings VALUES ('nzbperl_badAction','0');
  255. INSERT INTO tf_settings VALUES ('nzbperl_server','');
  256. INSERT INTO tf_settings VALUES ('nzbperl_user','');
  257. INSERT INTO tf_settings VALUES ('nzbperl_pw','');
  258. INSERT INTO tf_settings VALUES ('nzbperl_threads','0');
  259. INSERT INTO tf_settings VALUES ('nzbperl_conn','1');
  260. INSERT INTO tf_settings VALUES ('nzbperl_rate','0');
  261. INSERT INTO tf_settings VALUES ('nzbperl_create','0');
  262. INSERT INTO tf_settings VALUES ('nzbperl_options','');
  263. INSERT INTO tf_settings VALUES ('fluazu_host','localhost');
  264. INSERT INTO tf_settings VALUES ('fluazu_port','6884');
  265. INSERT INTO tf_settings VALUES ('fluazu_secure','0');
  266. INSERT INTO tf_settings VALUES ('fluazu_user','');
  267. INSERT INTO tf_settings VALUES ('fluazu_pw','');
  268. INSERT INTO tf_settings VALUES ('fluxd_dbmode','php');
  269. INSERT INTO tf_settings VALUES ('fluxd_loglevel','0');
  270. INSERT INTO tf_settings VALUES ('fluxd_Fluxinet_enabled','0');
  271. INSERT INTO tf_settings VALUES ('fluxd_Qmgr_enabled','0');
  272. INSERT INTO tf_settings VALUES ('fluxd_Rssad_enabled','0');
  273. INSERT INTO tf_settings VALUES ('fluxd_Watch_enabled','0');
  274. INSERT INTO tf_settings VALUES ('fluxd_Trigger_enabled','0');
  275. INSERT INTO tf_settings VALUES ('fluxd_Maintenance_enabled','0');
  276. INSERT INTO tf_settings VALUES ('fluxd_Fluxinet_port','3150');
  277. INSERT INTO tf_settings VALUES ('fluxd_Qmgr_interval','15');
  278. INSERT INTO tf_settings VALUES ('fluxd_Qmgr_maxTotalTransfers','5');
  279. INSERT INTO tf_settings VALUES ('fluxd_Qmgr_maxUserTransfers','2');
  280. INSERT INTO tf_settings VALUES ('fluxd_Rssad_interval','1800');
  281. INSERT INTO tf_settings VALUES ('fluxd_Rssad_jobs','');
  282. INSERT INTO tf_settings VALUES ('fluxd_Watch_interval','120');
  283. INSERT INTO tf_settings VALUES ('fluxd_Watch_jobs','');
  284. INSERT INTO tf_settings VALUES ('fluxd_Maintenance_interval','600');
  285. INSERT INTO tf_settings VALUES ('fluxd_Maintenance_trestart','0');
  286. INSERT INTO tf_settings VALUES ('fluxd_Trigger_interval','600');
  287. --
  288. -- Sequences for table tf_trprofiles
  289. --
  290. SELECT SETVAL('tf_trprofiles_id_seq',(select case when max(id)>0 then max(id)+1 else 1 end from tf_trprofiles));
  291. --
  292. -- commit
  293. --
  294. COMMIT;