Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rsr.v5.1.dev/web/install/dist/sql/tables.sql

    r3 r1  
    1 CREATE TABLE `[prefix]albums` (
     1CREATE TABLE IF NOT EXISTS `[prefix]albums` (
    22  `id` int(11) NOT NULL AUTO_INCREMENT,
    33  `id_artiste` int(11) NOT NULL,
     
    1616) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
    1717# --
    18 CREATE TABLE `[prefix]artistes` (
     18CREATE TABLE IF NOT EXISTS `[prefix]artistes` (
    1919  `id` int(11) NOT NULL AUTO_INCREMENT,
    2020  `nom` varchar(255) DEFAULT NULL,
     
    4040) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
    4141# --
    42 CREATE TABLE `[prefix]artistes_admins` (
     42CREATE TABLE IF NOT EXISTS `[prefix]artistes_admins` (
    4343  `id_artiste` int(11) NOT NULL,
    4444  `pun_user` int(11) NOT NULL,
     
    4646) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    4747# --
    48 CREATE TABLE `[prefix]boxes` (
     48CREATE TABLE IF NOT EXISTS `[prefix]boxes` (
    4949  `id` int(11) NOT NULL AUTO_INCREMENT,
    5050  `nom` varchar(64) DEFAULT NULL,
     
    6363) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=162 ;
    6464# --
    65 CREATE TABLE `[prefix]categories` (
     65CREATE TABLE IF NOT EXISTS `[prefix]categories` (
    6666  `id` int(11) NOT NULL AUTO_INCREMENT,
    6767  `nom` varchar(64) DEFAULT NULL,
     
    7474) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=103 ;
    7575# --
    76 CREATE TABLE `[prefix]categories_tree` (
     76CREATE TABLE IF NOT EXISTS `[prefix]categories_tree` (
    7777  `parent` int(11) NOT NULL,
    7878  `child` int(11) NOT NULL,
     
    8080) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    8181# --
    82 CREATE TABLE `[prefix]concerts` (
     82CREATE TABLE IF NOT EXISTS `[prefix]concerts` (
    8383  `id` int(11) NOT NULL AUTO_INCREMENT,
    8484  `id_artiste` int(11) DEFAULT NULL,
     
    9494) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
    9595# --
    96 CREATE TABLE `[prefix]configuration` (
     96CREATE TABLE IF NOT EXISTS `[prefix]configuration` (
    9797  `key` varchar(255) NOT NULL,
    9898  `value` text NOT NULL,
     
    100100) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    101101# --
    102 CREATE TABLE `[prefix]contenus` (
     102CREATE TABLE IF NOT EXISTS `[prefix]contenus` (
    103103  `id` int(11) NOT NULL AUTO_INCREMENT,
    104104  `nom` varchar(64) DEFAULT NULL,
     
    117117) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=935 ;
    118118# --
    119 CREATE TABLE `[prefix]downloads` (
     119CREATE TABLE IF NOT EXISTS `[prefix]downloads` (
    120120  `id` int(11) NOT NULL AUTO_INCREMENT,
    121121  `id_artiste` int(11) DEFAULT NULL,
     
    131131) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
    132132# --
    133 CREATE TABLE `[prefix]download_urls` (
     133CREATE TABLE IF NOT EXISTS `[prefix]download_urls` (
    134134  `id` int(11) NOT NULL AUTO_INCREMENT,
    135135  `id_download` int(11) DEFAULT NULL,
     
    143143) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
    144144# --
    145 CREATE TABLE `[prefix]formats` (
     145CREATE TABLE IF NOT EXISTS `[prefix]formats` (
    146146  `id` int(11) NOT NULL AUTO_INCREMENT,
    147147  `nom` varchar(32) DEFAULT NULL,
     
    150150) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
    151151# --
    152 CREATE TABLE `[prefix]licences` (
     152CREATE TABLE IF NOT EXISTS `[prefix]licences` (
    153153  `id` int(11) NOT NULL AUTO_INCREMENT,
    154154  `nom` varchar(255) NOT NULL DEFAULT '',
     
    158158) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
    159159# --
    160 CREATE TABLE `[prefix]playlists` (
     160CREATE TABLE IF NOT EXISTS `[prefix]playlists` (
    161161  `id` int(11) NOT NULL AUTO_INCREMENT,
    162162  `pun_user` int(11) NOT NULL,
     
    167167) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
    168168# --
    169 CREATE TABLE `[prefix]playlist_download` (
     169CREATE TABLE IF NOT EXISTS `[prefix]playlist_download` (
    170170  `id` int(11) NOT NULL,
    171171  `id_download` int(11) NOT NULL,
     
    173173) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    174174# --
    175 CREATE TABLE `[prefix]pun_bans` (
     175CREATE TABLE IF NOT EXISTS `[prefix]pun_bans` (
    176176  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    177177  `username` varchar(200) DEFAULT NULL,
    178178  `ip` varchar(255) DEFAULT NULL,
    179   `email` varchar(80) DEFAULT NULL,
     179  `email` varchar(50) DEFAULT NULL,
    180180  `message` varchar(255) DEFAULT NULL,
    181181  `expire` int(10) unsigned DEFAULT NULL,
    182   `ban_creator` int(10) unsigned NOT NULL DEFAULT '0',
    183   PRIMARY KEY (`id`),
    184   KEY `[prefix]pun_bans_username_idx` (`username`(25))
     182  PRIMARY KEY (`id`)
    185183) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
    186184# --
    187 CREATE TABLE `[prefix]pun_categories` (
     185CREATE TABLE IF NOT EXISTS `[prefix]pun_categories` (
    188186  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    189187  `cat_name` varchar(80) NOT NULL DEFAULT 'New Category',
     
    192190) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=22 ;
    193191# --
    194 CREATE TABLE `[prefix]pun_censoring` (
     192CREATE TABLE IF NOT EXISTS `[prefix]pun_censoring` (
    195193  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    196194  `search_for` varchar(60) NOT NULL DEFAULT '',
     
    199197) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
    200198# --
    201 CREATE TABLE `[prefix]pun_config` (
     199CREATE TABLE IF NOT EXISTS `[prefix]pun_config` (
    202200  `conf_name` varchar(255) NOT NULL DEFAULT '',
    203201  `conf_value` text,
     
    205203) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    206204# --
    207 CREATE TABLE `[prefix]pun_forums` (
     205CREATE TABLE IF NOT EXISTS `[prefix]pun_forums` (
    208206  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    209207  `forum_name` varchar(80) NOT NULL DEFAULT 'New forum',
     
    222220) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=103 ;
    223221# --
    224 CREATE TABLE `[prefix]pun_forum_perms` (
     222CREATE TABLE IF NOT EXISTS `[prefix]pun_forum_perms` (
    225223  `group_id` int(10) NOT NULL DEFAULT '0',
    226224  `forum_id` int(10) NOT NULL DEFAULT '0',
     
    231229) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    232230# --
    233 CREATE TABLE `[prefix]pun_forum_subscriptions` (
    234   `user_id` int(10) unsigned NOT NULL DEFAULT '0',
    235   `forum_id` int(10) unsigned NOT NULL DEFAULT '0',
    236   PRIMARY KEY (`user_id`,`forum_id`)
    237 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    238 # --
    239 CREATE TABLE `[prefix]pun_groups` (
     231CREATE TABLE IF NOT EXISTS `[prefix]pun_groups` (
    240232  `g_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    241233  `g_title` varchar(50) NOT NULL DEFAULT '',
    242234  `g_user_title` varchar(50) DEFAULT NULL,
    243   `g_moderator` tinyint(1) NOT NULL DEFAULT '0',
    244   `g_mod_edit_users` tinyint(1) NOT NULL DEFAULT '0',
    245   `g_mod_rename_users` tinyint(1) NOT NULL DEFAULT '0',
    246   `g_mod_change_passwords` tinyint(1) NOT NULL DEFAULT '0',
    247   `g_mod_ban_users` tinyint(1) NOT NULL DEFAULT '0',
    248235  `g_read_board` tinyint(1) NOT NULL DEFAULT '1',
    249   `g_view_users` tinyint(1) NOT NULL DEFAULT '1',
    250236  `g_post_replies` tinyint(1) NOT NULL DEFAULT '1',
    251237  `g_post_topics` tinyint(1) NOT NULL DEFAULT '1',
     238  `g_post_polls` tinyint(1) NOT NULL DEFAULT '1',
    252239  `g_edit_posts` tinyint(1) NOT NULL DEFAULT '1',
    253240  `g_delete_posts` tinyint(1) NOT NULL DEFAULT '1',
     
    256243  `g_search` tinyint(1) NOT NULL DEFAULT '1',
    257244  `g_search_users` tinyint(1) NOT NULL DEFAULT '1',
    258   `g_send_email` tinyint(1) NOT NULL DEFAULT '1',
     245  `g_edit_subjects_interval` smallint(6) NOT NULL DEFAULT '300',
    259246  `g_post_flood` smallint(6) NOT NULL DEFAULT '30',
    260247  `g_search_flood` smallint(6) NOT NULL DEFAULT '30',
    261   `g_email_flood` smallint(6) NOT NULL DEFAULT '60',
    262   `g_report_flood` smallint(6) NOT NULL DEFAULT '60',
    263248  PRIMARY KEY (`g_id`)
    264249) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
    265250# --
    266 CREATE TABLE `[prefix]pun_online` (
     251CREATE TABLE IF NOT EXISTS `[prefix]pun_online` (
    267252  `user_id` int(10) unsigned NOT NULL DEFAULT '1',
    268253  `ident` varchar(200) NOT NULL DEFAULT '',
    269254  `logged` int(10) unsigned NOT NULL DEFAULT '0',
    270255  `idle` tinyint(1) NOT NULL DEFAULT '0',
    271   `last_post` int(10) unsigned DEFAULT NULL,
    272   `last_search` int(10) unsigned DEFAULT NULL,
    273   UNIQUE KEY `[prefix]pun_online_user_id_ident_idx` (`user_id`,`ident`(25)),
    274   KEY `pun_online_user_id_idx` (`user_id`),
    275   KEY `[prefix]pun_online_ident_idx` (`ident`(25)),
    276   KEY `[prefix]pun_online_logged_idx` (`logged`)
    277 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    278 # --
    279 CREATE TABLE `[prefix]pun_posts` (
     256  KEY `pun_online_user_id_idx` (`user_id`)
     257) ENGINE=MEMORY DEFAULT CHARSET=utf8;
     258# --
     259CREATE TABLE IF NOT EXISTS `[prefix]pun_posts` (
    280260  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    281261  `poster` varchar(200) NOT NULL DEFAULT '',
    282262  `poster_id` int(10) unsigned NOT NULL DEFAULT '1',
    283   `poster_ip` varchar(39) DEFAULT NULL,
    284   `poster_email` varchar(80) DEFAULT NULL,
    285   `message` mediumtext,
     263  `poster_ip` varchar(15) DEFAULT NULL,
     264  `poster_email` varchar(50) DEFAULT NULL,
     265  `message` text NOT NULL,
    286266  `hide_smilies` tinyint(1) NOT NULL DEFAULT '0',
    287267  `posted` int(10) unsigned NOT NULL DEFAULT '0',
     
    294274) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=21233 ;
    295275# --
    296 CREATE TABLE `[prefix]pun_ranks` (
     276CREATE TABLE IF NOT EXISTS `[prefix]pun_ranks` (
    297277  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    298278  `rank` varchar(50) NOT NULL DEFAULT '',
     
    301281) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;
    302282# --
    303 CREATE TABLE `[prefix]pun_reports` (
     283CREATE TABLE IF NOT EXISTS `[prefix]pun_reports` (
    304284  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    305285  `post_id` int(10) unsigned NOT NULL DEFAULT '0',
     
    315295) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
    316296# --
    317 CREATE TABLE `[prefix]pun_search_cache` (
     297CREATE TABLE IF NOT EXISTS `[prefix]pun_search_cache` (
    318298  `id` int(10) unsigned NOT NULL DEFAULT '0',
    319299  `ident` varchar(200) NOT NULL DEFAULT '',
    320   `search_data` mediumtext,
     300  `search_data` text NOT NULL,
    321301  PRIMARY KEY (`id`),
    322302  KEY `pun_search_cache_ident_idx` (`ident`(8))
    323303) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    324304# --
    325 CREATE TABLE `[prefix]pun_search_matches` (
     305CREATE TABLE IF NOT EXISTS `[prefix]pun_search_matches` (
    326306  `post_id` int(10) unsigned NOT NULL DEFAULT '0',
    327307  `word_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
     
    331311) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    332312# --
    333 CREATE TABLE `[prefix]pun_search_words` (
     313CREATE TABLE IF NOT EXISTS `[prefix]pun_search_words` (
    334314  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
    335315  `word` varchar(20) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
     
    338318) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
    339319# --
    340 CREATE TABLE `[prefix]pun_smilies` (
     320CREATE TABLE IF NOT EXISTS `[prefix]pun_smilies` (
    341321  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    342322  `image` varchar(60) NOT NULL DEFAULT '',
     
    346326) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=89 ;
    347327# --
    348 CREATE TABLE `[prefix]pun_topics` (
     328CREATE TABLE IF NOT EXISTS `[prefix]pun_subscriptions` (
     329  `user_id` int(10) unsigned NOT NULL DEFAULT '0',
     330  `topic_id` int(10) unsigned NOT NULL DEFAULT '0',
     331  PRIMARY KEY (`user_id`,`topic_id`)
     332) ENGINE=MyISAM DEFAULT CHARSET=utf8;
     333# --
     334CREATE TABLE IF NOT EXISTS `[prefix]pun_topics` (
    349335  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    350336  `poster` varchar(200) NOT NULL DEFAULT '',
    351337  `subject` varchar(255) NOT NULL DEFAULT '',
    352338  `posted` int(10) unsigned NOT NULL DEFAULT '0',
    353   `first_post_id` int(10) unsigned NOT NULL DEFAULT '0',
    354339  `last_post` int(10) unsigned NOT NULL DEFAULT '0',
    355340  `last_post_id` int(10) unsigned NOT NULL DEFAULT '0',
     
    363348  PRIMARY KEY (`id`),
    364349  KEY `pun_topics_forum_id_idx` (`forum_id`),
    365   KEY `pun_topics_moved_to_idx` (`moved_to`),
    366   KEY `[prefix]pun_topics_last_post_idx` (`last_post`),
    367   KEY `[prefix]pun_topics_first_post_id_idx` (`first_post_id`)
     350  KEY `pun_topics_moved_to_idx` (`moved_to`)
    368351) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2441 ;
    369352# --
    370 CREATE TABLE `[prefix]pun_topic_subscriptions` (
    371   `user_id` int(10) unsigned NOT NULL DEFAULT '0',
    372   `topic_id` int(10) unsigned NOT NULL DEFAULT '0',
    373   PRIMARY KEY (`user_id`,`topic_id`)
    374 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    375 # --
    376 CREATE TABLE `[prefix]pun_users` (
     353CREATE TABLE IF NOT EXISTS `[prefix]pun_users` (
    377354  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    378355  `group_id` int(10) unsigned NOT NULL DEFAULT '4',
    379356  `username` varchar(200) NOT NULL DEFAULT '',
    380357  `password` varchar(40) NOT NULL DEFAULT '',
    381   `email` varchar(80) NOT NULL DEFAULT '',
     358  `email` varchar(50) NOT NULL DEFAULT '',
    382359  `title` varchar(50) DEFAULT NULL,
    383360  `realname` varchar(40) DEFAULT NULL,
    384361  `url` varchar(100) DEFAULT NULL,
    385   `jabber` varchar(80) DEFAULT NULL,
     362  `jabber` varchar(75) DEFAULT NULL,
    386363  `icq` varchar(12) DEFAULT NULL,
    387   `msn` varchar(80) DEFAULT NULL,
     364  `msn` varchar(50) DEFAULT NULL,
    388365  `aim` varchar(30) DEFAULT NULL,
    389366  `yahoo` varchar(30) DEFAULT NULL,
    390367  `location` varchar(30) DEFAULT NULL,
     368  `use_avatar` tinyint(1) NOT NULL DEFAULT '0',
    391369  `signature` text,
    392370  `disp_topics` tinyint(3) unsigned DEFAULT NULL,
    393371  `disp_posts` tinyint(3) unsigned DEFAULT NULL,
    394372  `email_setting` tinyint(1) NOT NULL DEFAULT '1',
     373  `save_pass` tinyint(1) NOT NULL DEFAULT '1',
    395374  `notify_with_post` tinyint(1) NOT NULL DEFAULT '0',
    396   `auto_notify` tinyint(1) NOT NULL DEFAULT '0',
    397375  `show_smilies` tinyint(1) NOT NULL DEFAULT '1',
    398376  `show_img` tinyint(1) NOT NULL DEFAULT '1',
     
    401379  `show_sig` tinyint(1) NOT NULL DEFAULT '1',
    402380  `timezone` float NOT NULL DEFAULT '0',
    403   `dst` tinyint(1) NOT NULL DEFAULT '0',
    404   `date_format` tinyint(1) NOT NULL DEFAULT '0',
    405   `time_format` tinyint(1) NOT NULL DEFAULT '0',
    406381  `language` varchar(25) NOT NULL DEFAULT 'English',
    407382  `style` varchar(25) NOT NULL DEFAULT 'Oxygen',
    408383  `num_posts` int(10) unsigned NOT NULL DEFAULT '0',
    409384  `last_post` int(10) unsigned DEFAULT NULL,
    410   `last_search` int(10) unsigned DEFAULT NULL,
    411   `last_email_sent` int(10) unsigned DEFAULT NULL,
    412   `last_report_sent` int(10) unsigned DEFAULT NULL,
    413385  `registered` int(10) unsigned NOT NULL DEFAULT '0',
    414   `registration_ip` varchar(39) NOT NULL DEFAULT '0.0.0.0',
     386  `registration_ip` varchar(15) NOT NULL DEFAULT '0.0.0.0',
    415387  `last_visit` int(10) unsigned NOT NULL DEFAULT '0',
    416388  `admin_note` varchar(30) DEFAULT NULL,
    417   `activate_string` varchar(80) DEFAULT NULL,
     389  `activate_string` varchar(50) DEFAULT NULL,
    418390  `activate_key` varchar(8) DEFAULT NULL,
    419391  PRIMARY KEY (`id`),
    420   UNIQUE KEY `[prefix]_pun_users_username_idx` (`username`(25)),
    421392  KEY `pun_users_registered_idx` (`registered`),
    422393  KEY `pun_users_username_idx` (`username`(8))
    423394) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1559 ;
    424395# --
    425 CREATE TABLE `[prefix]super_admins` (
     396CREATE TABLE IF NOT EXISTS `[prefix]super_admins` (
    426397  `id_pun_user` int(11) NOT NULL,
    427398  PRIMARY KEY (`id_pun_user`)
    428399) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    429400# --
    430 CREATE TABLE `[prefix]thumbs` (
     401CREATE TABLE IF NOT EXISTS `[prefix]thumbs` (
    431402  `id` int(11) NOT NULL AUTO_INCREMENT,
    432403  `src` varchar(255) NOT NULL DEFAULT '',
     
    442413) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
    443414# --
    444 CREATE TABLE `[prefix]videos` (
     415CREATE TABLE IF NOT EXISTS `[prefix]videos` (
    445416  `id` int(11) NOT NULL AUTO_INCREMENT,
    446417  `id_artiste` int(11) DEFAULT NULL,
Note: See TracChangeset for help on using the changeset viewer.