Changeset 7


Ignore:
Timestamp:
Mar 31, 2007, 8:37:11 PM (12 years ago)
Author:
julian
Message:
  • Current DB-Structure
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/dbstructure.sql

    r3 r7  
    3636
    3737CREATE TABLE `tbb2_cats` (
    38   `CatID` mediumint(5) unsigned NOT NULL auto_increment,
    39   `CatL` mediumint(5) NOT NULL default '0',
    40   `CatR` mediumint(5) NOT NULL default '0',
    41   `CatStandardStatus` tinyint(1) unsigned NOT NULL default '1',
    42   `CatName` varchar(255) NOT NULL default '',
    43   `CatDescription` varchar(255) NOT NULL default '',
    44   PRIMARY KEY  (`CatID`)
     38  `catID` mediumint(5) unsigned NOT NULL auto_increment,
     39  `catL` mediumint(5) NOT NULL default '0',
     40  `catR` mediumint(5) NOT NULL default '0',
     41  `catStandardStatus` tinyint(1) unsigned NOT NULL default '1',
     42  `catName` varchar(255) NOT NULL default '',
     43  `catDescription` varchar(255) NOT NULL default '',
     44  PRIMARY KEY  (`catID`)
    4545) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    4646
     
    5959
    6060CREATE TABLE `tbb2_forums` (
    61   `ForumID` mediumint(8) unsigned NOT NULL auto_increment,
    62   `CatID` mediumint(8) unsigned NOT NULL default '0',
    63   `OrderID` mediumint(8) unsigned NOT NULL default '0',
    64   `ForumName` varchar(255) NOT NULL default '',
    65   `ForumDescription` varchar(255) NOT NULL default '',
    66   `ForumTopicsCounter` mediumint(8) unsigned NOT NULL default '0',
    67   `ForumPostsCounter` mediumint(8) unsigned NOT NULL default '0',
    68   `ForumLastPostID` mediumint(8) unsigned NOT NULL default '0',
    69   `ForumEnableBBCode` tinyint(1) unsigned NOT NULL default '0',
    70   `ForumEnableHtmlCode` tinyint(1) unsigned NOT NULL default '0',
    71   `ForumEnableSmilies` tinyint(1) unsigned NOT NULL default '0',
    72   `ForumEnableURITransformation` tinyint(1) unsigned NOT NULL default '0',
    73   `forum_is_moderated` tinyint(1) unsigned NOT NULL default '0',
    74   `forum_show_latest_posts` tinyint(1) unsigned NOT NULL default '0',
    75   `auth_members_view_forum` tinyint(1) unsigned NOT NULL default '0',
    76   `auth_members_post_topic` tinyint(1) unsigned NOT NULL default '0',
    77   `auth_members_post_reply` tinyint(1) unsigned NOT NULL default '0',
    78   `auth_members_post_poll` tinyint(1) unsigned NOT NULL default '0',
    79   `auth_members_edit_posts` tinyint(1) unsigned NOT NULL default '0',
    80   `GuestsAuthViewForum` tinyint(1) unsigned NOT NULL default '0',
    81   `auth_guests_post_topic` tinyint(1) unsigned NOT NULL default '0',
    82   `auth_guests_post_reply` tinyint(1) unsigned NOT NULL default '0',
    83   `auth_guests_post_poll` tinyint(1) unsigned NOT NULL default '0',
    84   PRIMARY KEY  (`ForumID`),
    85   KEY `cat_id` (`CatID`),
    86   KEY `order_id` (`OrderID`)
     61  `forumID` mediumint(8) unsigned NOT NULL auto_increment,
     62  `catID` mediumint(8) unsigned NOT NULL default '0',
     63  `orderID` mediumint(8) unsigned NOT NULL default '0',
     64  `forumName` varchar(255) NOT NULL default '',
     65  `forumDescription` varchar(255) NOT NULL default '',
     66  `forumTopicsCounter` mediumint(8) unsigned NOT NULL default '0',
     67  `forumPostsCounter` mediumint(8) unsigned NOT NULL default '0',
     68  `forumLastPostID` mediumint(8) unsigned NOT NULL default '0',
     69  `forumEnableBBCode` tinyint(1) unsigned NOT NULL default '0',
     70  `forumEnableHtmlCode` tinyint(1) unsigned NOT NULL default '0',
     71  `forumEnableSmilies` tinyint(1) unsigned NOT NULL default '0',
     72  `forumEnableURITransformation` tinyint(1) unsigned NOT NULL default '0',
     73  `forumIsModerated` tinyint(1) unsigned NOT NULL default '0',
     74  `forumShowLatestPosts` tinyint(1) unsigned NOT NULL default '0',
     75  `membersAuthViewForum` tinyint(1) unsigned NOT NULL default '0',
     76  `authPostTopicMembers` tinyint(1) unsigned NOT NULL default '0',
     77  `authPostReplyMembers` tinyint(1) unsigned NOT NULL default '0',
     78  `authPostPollMembers` tinyint(1) unsigned NOT NULL default '0',
     79  `authEditPostsMembers` tinyint(1) unsigned NOT NULL default '0',
     80  `authViewForumGuests` tinyint(1) unsigned NOT NULL default '0',
     81  `authPostTopicGuests` tinyint(1) unsigned NOT NULL default '0',
     82  `authPostReplyGuests` tinyint(1) unsigned NOT NULL default '0',
     83  `authPostPollGuests` tinyint(1) unsigned NOT NULL default '0',
     84  PRIMARY KEY  (`forumID`),
     85  KEY `cat_id` (`catID`),
     86  KEY `order_id` (`orderID`)
    8787) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    8888
     
    9292
    9393CREATE TABLE `tbb2_forums_auth` (
    94   `ForumID` mediumint(8) unsigned NOT NULL default '0',
    95   `AuthType` tinyint(1) unsigned NOT NULL default '0',
    96   `AuthID` mediumint(8) unsigned NOT NULL default '0',
    97   `auth_view_forum` tinyint(1) unsigned NOT NULL default '0',
    98   `auth_post_topic` tinyint(1) unsigned NOT NULL default '0',
    99   `auth_post_reply` tinyint(1) unsigned NOT NULL default '0',
    100   `auth_post_poll` tinyint(1) unsigned NOT NULL default '0',
    101   `auth_edit_posts` tinyint(1) unsigned NOT NULL default '0',
    102   `AuthIsMod` tinyint(1) unsigned NOT NULL default '0',
    103   KEY `forum_id` (`ForumID`)
     94  `forumID` mediumint(8) unsigned NOT NULL default '0',
     95  `authType` tinyint(1) unsigned NOT NULL default '0',
     96  `authID` mediumint(8) unsigned NOT NULL default '0',
     97  `authViewForum` tinyint(1) unsigned NOT NULL default '0',
     98  `authPostTopic` tinyint(1) unsigned NOT NULL default '0',
     99  `authPostReply` tinyint(1) unsigned NOT NULL default '0',
     100  `authPostPoll` tinyint(1) unsigned NOT NULL default '0',
     101  `authEditPosts` tinyint(1) unsigned NOT NULL default '0',
     102  `authIsMod` tinyint(1) unsigned NOT NULL default '0',
     103  KEY `forum_id` (`forumID`)
    104104) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    105105
     
    212212
    213213CREATE TABLE `tbb2_posts` (
    214   `PostID` mediumint(8) unsigned NOT NULL auto_increment,
    215   `TopicID` mediumint(8) unsigned NOT NULL default '0',
    216   `ForumID` mediumint(8) unsigned NOT NULL default '0',
    217   `PosterID` mediumint(8) unsigned NOT NULL default '0',
    218   `PostTimestamp` int(10) unsigned NOT NULL default '0',
    219   `PostIP` varchar(15) NOT NULL default '',
    220   `SmileyID` smallint(5) unsigned NOT NULL default '0',
    221   `PostEnableBBCode` tinyint(1) unsigned NOT NULL default '0',
    222   `PostEnableSmilies` tinyint(1) unsigned NOT NULL default '0',
    223   `PostEnableHtmlCode` tinyint(1) unsigned NOT NULL default '0',
    224   `PostShowSignature` tinyint(1) unsigned NOT NULL default '0',
    225   `post_enable_urltransformation` tinyint(1) unsigned NOT NULL default '0',
    226   `post_show_editings` tinyint(1) unsigned NOT NULL default '0',
    227   `PostGuestNick` varchar(15) NOT NULL default '',
    228   `PostEditedCounter` smallint(5) unsigned NOT NULL default '0',
    229   `post_last_editor_id` mediumint(8) unsigned NOT NULL default '0',
    230   `PostTitle` varchar(255) NOT NULL default '',
    231   `PostText` text NOT NULL,
    232   PRIMARY KEY  (`PostID`),
    233   KEY `topic_id` (`TopicID`),
    234   KEY `forum_id` (`ForumID`),
    235   KEY `poster_id` (`PosterID`)
     214  `postID` mediumint(8) unsigned NOT NULL auto_increment,
     215  `topicID` mediumint(8) unsigned NOT NULL default '0',
     216  `forumID` mediumint(8) unsigned NOT NULL default '0',
     217  `posterID` mediumint(8) unsigned NOT NULL default '0',
     218  `postTimestamp` int(10) unsigned NOT NULL default '0',
     219  `postIP` varchar(15) NOT NULL default '',
     220  `smileyID` smallint(5) unsigned NOT NULL default '0',
     221  `postEnableBBCode` tinyint(1) unsigned NOT NULL default '0',
     222  `postEnableSmilies` tinyint(1) unsigned NOT NULL default '0',
     223  `postEnableHtmlCode` tinyint(1) unsigned NOT NULL default '0',
     224  `postShowSignature` tinyint(1) unsigned NOT NULL default '0',
     225  `postEnableURITransformation` tinyint(1) unsigned NOT NULL default '0',
     226  `postShowEditings` tinyint(1) unsigned NOT NULL default '0',
     227  `postGuestNick` varchar(15) NOT NULL default '',
     228  `postEditedCounter` smallint(5) unsigned NOT NULL default '0',
     229  `postLastEditorID` mediumint(8) unsigned NOT NULL default '0',
     230  `postTitle` varchar(255) NOT NULL default '',
     231  `postText` text NOT NULL,
     232  PRIMARY KEY  (`postID`),
     233  KEY `topic_id` (`topicID`),
     234  KEY `forum_id` (`forumID`),
     235  KEY `poster_id` (`posterID`)
    236236) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    237237
     
    285285
    286286CREATE TABLE `tbb2_ranks` (
    287   `RankID` smallint(5) unsigned NOT NULL auto_increment,
    288   `RankType` tinyint(1) unsigned NOT NULL default '0',
    289   `RankName` varchar(255) NOT NULL default '',
    290   `RankGfx` text NOT NULL,
    291   `RankPosts` mediumint(8) unsigned NOT NULL default '0',
    292   PRIMARY KEY  (`RankID`),
    293   KEY `rank_type` (`RankType`)
     287  `rankID` smallint(5) unsigned NOT NULL auto_increment,
     288  `rankType` tinyint(1) unsigned NOT NULL default '0',
     289  `rankName` varchar(255) NOT NULL default '',
     290  `rankGfx` text NOT NULL,
     291  `rankPosts` mediumint(8) unsigned NOT NULL default '0',
     292  PRIMARY KEY  (`rankID`),
     293  KEY `rank_type` (`rankType`)
    294294) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    295295
     
    311311
    312312CREATE TABLE `tbb2_sessions` (
    313   `SessionID` varchar(32) NOT NULL default '',
    314   `SessionLastUpdate` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
    315   `SessionData` text NOT NULL,
    316   `SessionUserID` mediumint(8) unsigned NOT NULL default '0',
    317   `SessionIsGhost` tinyint(1) unsigned NOT NULL default '0',
    318   `SessionLastLocation` varchar(255) NOT NULL default 'forumindex',
    319   PRIMARY KEY  (`SessionID`),
    320   KEY `session_last_update` (`SessionLastUpdate`)
     313  `sessionID` varchar(32) NOT NULL default '',
     314  `sessionLastUpdate` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
     315  `sessionData` text NOT NULL,
     316  `sessionUserID` mediumint(8) unsigned NOT NULL default '0',
     317  `sessionIsGhost` tinyint(1) unsigned NOT NULL default '0',
     318  `sessionLastLocation` varchar(255) NOT NULL default 'forumindex',
     319  PRIMARY KEY  (`sessionID`),
     320  KEY `session_last_update` (`sessionLastUpdate`)
    321321) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    322322
     
    339339
    340340CREATE TABLE `tbb2_topics` (
    341   `TopicID` mediumint(8) unsigned NOT NULL auto_increment,
    342   `ForumID` mediumint(8) unsigned NOT NULL default '0',
    343   `PosterID` mediumint(8) unsigned NOT NULL default '0',
    344   `TopicStatus` tinyint(1) unsigned NOT NULL default '0',
    345   `TopicIsPinned` tinyint(1) unsigned NOT NULL default '0',
    346   `SmileyID` smallint(5) unsigned NOT NULL default '0',
    347   `TopicRepliesCounter` mediumint(8) unsigned NOT NULL default '0',
    348   `TopicViewsCounter` mediumint(8) unsigned NOT NULL default '0',
    349   `TopicHasPoll` tinyint(1) unsigned NOT NULL default '0',
    350   `TopicFirstPostID` mediumint(8) unsigned NOT NULL default '0',
    351   `TopicLastPostID` mediumint(8) unsigned NOT NULL default '0',
    352   `TopicMovedID` mediumint(8) unsigned NOT NULL default '0',
    353   `TopicPostTime` int(10) unsigned NOT NULL default '0',
    354   `TopicTitle` varchar(255) NOT NULL default '',
    355   `TopicGuestNick` varchar(255) NOT NULL default '',
    356   PRIMARY KEY  (`TopicID`),
    357   KEY `forum_id_topic_id` (`ForumID`,`TopicID`),
    358   KEY `poster_id` (`PosterID`),
    359   KEY `topic_moved_id` (`TopicMovedID`)
     341  `topicID` mediumint(8) unsigned NOT NULL auto_increment,
     342  `forumID` mediumint(8) unsigned NOT NULL default '0',
     343  `posterID` mediumint(8) unsigned NOT NULL default '0',
     344  `topicStatus` tinyint(1) unsigned NOT NULL default '0',
     345  `topicIsPinned` tinyint(1) unsigned NOT NULL default '0',
     346  `smileyID` smallint(5) unsigned NOT NULL default '0',
     347  `topicRepliesCounter` mediumint(8) unsigned NOT NULL default '0',
     348  `topicViewsCounter` mediumint(8) unsigned NOT NULL default '0',
     349  `topicHasPoll` tinyint(1) unsigned NOT NULL default '0',
     350  `topicFirstPostID` mediumint(8) unsigned NOT NULL default '0',
     351  `topicLastPostID` mediumint(8) unsigned NOT NULL default '0',
     352  `topicMovedID` mediumint(8) unsigned NOT NULL default '0',
     353  `topicPostTime` int(10) unsigned NOT NULL default '0',
     354  `topicTitle` varchar(255) NOT NULL default '',
     355  `topicGuestNick` varchar(255) NOT NULL default '',
     356  PRIMARY KEY  (`topicID`),
     357  KEY `forum_id_topic_id` (`forumID`,`topicID`),
     358  KEY `poster_id` (`posterID`),
     359  KEY `topic_moved_id` (`topicMovedID`)
    360360) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    361361
     
    376376
    377377CREATE TABLE `tbb2_users` (
    378   `UserID` mediumint(8) unsigned NOT NULL auto_increment,
    379   `UserStatus` tinyint(1) unsigned NOT NULL default '0',
    380   `UserIsAdmin` tinyint(1) unsigned NOT NULL default '0',
    381   `UserIsSupermod` tinyint(1) unsigned NOT NULL default '0',
    382   `user_hash` varchar(32) NOT NULL default '',
    383   `UserNick` varchar(255) NOT NULL default '',
    384   `UserEmail` varchar(255) NOT NULL default '',
    385   `UserPassword` varchar(255) NOT NULL default '',
    386   `UserPasswordSalt` varchar(255) default NULL,
    387   `UserNewPassword` varchar(255) default NULL,
    388   `UserNewPasswordSalt` varchar(255) default NULL,
    389   `UserPostsCounter` mediumint(8) unsigned NOT NULL default '0',
    390   `UserRegistrationTimestamp` int(10) unsigned NOT NULL default '0',
    391   `UserSignature` text NOT NULL,
     378  `userID` mediumint(8) unsigned NOT NULL auto_increment,
     379  `userStatus` tinyint(1) unsigned NOT NULL default '0',
     380  `userIsAdmin` tinyint(1) unsigned NOT NULL default '0',
     381  `userIsSupermod` tinyint(1) unsigned NOT NULL default '0',
     382  `userHash` varchar(32) NOT NULL default '',
     383  `userNick` varchar(255) NOT NULL default '',
     384  `userEmail` varchar(255) NOT NULL default '',
     385  `userPassword` varchar(255) NOT NULL default '',
     386  `userPasswordSalt` varchar(255) default NULL,
     387  `userNewPassword` varchar(255) default NULL,
     388  `userNewPasswordSalt` varchar(255) default NULL,
     389  `userPostsCounter` mediumint(8) unsigned NOT NULL default '0',
     390  `userRegistrationTimestamp` int(10) unsigned NOT NULL default '0',
     391  `userSignature` text NOT NULL,
    392392  `user_group_id` mediumint(8) unsigned NOT NULL default '0',
    393393  `user_special_status` mediumint(8) unsigned NOT NULL default '0',
    394   `user_last_action` int(10) unsigned NOT NULL default '0',
    395   `RankID` smallint(5) unsigned NOT NULL default '0',
    396   `UserAvatarAddress` varchar(255) NOT NULL default '',
     394  `userLastAction` int(10) unsigned NOT NULL default '0',
     395  `rankID` smallint(5) unsigned NOT NULL default '0',
     396  `userAvatarAddress` varchar(255) NOT NULL default '',
    397397  `user_tz` varchar(255) NOT NULL default 'gmt',
    398   `user_new_pw` varchar(32) NOT NULL default '',
    399   `UserReceiveEmails` tinyint(1) unsigned NOT NULL default '1',
    400   `UserHideEmail` tinyint(1) unsigned NOT NULL default '0',
    401   `user_is_locked` tinyint(1) unsigned NOT NULL default '0',
    402   `user_memo` text NOT NULL,
     398  `userReceiveEmails` tinyint(1) unsigned NOT NULL default '1',
     399  `userHideEmail` tinyint(1) unsigned NOT NULL default '0',
     400  `userIsLocked` tinyint(1) unsigned NOT NULL default '0',
     401  `userMemo` text NOT NULL,
    403402  `user_auth_profile_notes` tinyint(1) unsigned NOT NULL default '2',
    404403  `user_language` varchar(255) NOT NULL default '',
    405   PRIMARY KEY  (`UserID`),
    406   KEY `user_last_action` (`user_last_action`),
    407   KEY `user_rank_id` (`RankID`)
     404  PRIMARY KEY  (`userID`),
     405  KEY `user_last_action` (`userLastAction`),
     406  KEY `user_rank_id` (`rankID`)
    408407) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    409408
Note: See TracChangeset for help on using the changeset viewer.