Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jalbarracinv authored Dec 26, 2021
1 parent 4c81e1e commit 3b30946
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,50 @@ Included Files:
2) funct.py -> main bbs functions

3) head.seq -> a sequence (random chars) file generated with http://petscii.krissz.hu/ this is just to have "something" to show to the user.

## To start, first create the needed databases in MySQL with the following commands:

CREATE DATABASE `cbmbbs` /*!40100 DEFAULT CHARACTER SET utf8 */;

CREATE TABLE `accounts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`password` varchar(255) NOT NULL,
`email` varchar(100) NOT NULL,
`active` int(11) NOT NULL,
`level` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `idx_accounts_username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

CREATE TABLE `posts` (
`idmessage` int(11) NOT NULL AUTO_INCREMENT,
`date` datetime DEFAULT NULL,
`subject` varchar(128) DEFAULT NULL,
`userid` int(11) DEFAULT NULL,
`idboard` int(11) DEFAULT NULL,
`body` blob DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`idreply` int(11) DEFAULT NULL,
PRIMARY KEY (`idmessage`),
KEY `idx_boardmessages_userid` (`userid`),
KEY `idx_boardmessages_boardid` (`idboard`),
KEY `idx_boardmessages_date` (`date`),
KEY `idx_boardmessages_replyid` (`idreply`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `posts` (
`idmessage` int(11) NOT NULL AUTO_INCREMENT,
`date` datetime DEFAULT NULL,
`subject` varchar(128) DEFAULT NULL,
`userid` int(11) DEFAULT NULL,
`idboard` int(11) DEFAULT NULL,
`body` blob DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`idreply` int(11) DEFAULT NULL,
PRIMARY KEY (`idmessage`),
KEY `idx_boardmessages_userid` (`userid`),
KEY `idx_boardmessages_boardid` (`idboard`),
KEY `idx_boardmessages_date` (`date`),
KEY `idx_boardmessages_replyid` (`idreply`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

0 comments on commit 3b30946

Please sign in to comment.