@r937 i’m more of a phpmyadmin kind of guy so here is a copy from those tables dump as i created it in a few clicks rather than by hand in the commmandline. Let me know if it helps.
Group_posts sql DUMP:-
CREATE TABLE `group_posts` (
`gp_id` int(255) NOT NULL,
`pid` varchar(16) NOT NULL,
`gname` varchar(100) NOT NULL,
`author_gp` varchar(255) NOT NULL,
`type` enum('0','1') NOT NULL,
`title` varchar(500) NOT NULL,
`data` varchar(10000) NOT NULL,
`pdate` datetime NOT NULL,
`vote_up` int(255) NOT NULL,
`vote_down` int(255) NOT NULL,
`group_id` int(255) NOT NULL,
`author_id` int(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `group_posts`
ADD PRIMARY KEY (`gp_id`),
ADD KEY `group_id` (`group_id`),
ADD KEY `author_id` (`author_id`),
ADD KEY `group_id_2` (`group_id`,`author_id`),
ADD KEY `pid` (`pid`),
ADD KEY `gp_id` (`gp_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `group_posts`
--
ALTER TABLE `group_posts`
MODIFY `gp_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=105;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `group_posts`
--
ALTER TABLE `group_posts`
ADD CONSTRAINT `group_posts_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `groups` (`g_id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `group_posts_user_id` FOREIGN KEY (`author_id`) REFERENCES `user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
updates table DUMP:-
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `project`
--
-- --------------------------------------------------------
--
-- Table structure for table `updates`
--
CREATE TABLE `updates` (
`update_id` int(255) NOT NULL,
`update_body` varchar(10000) NOT NULL,
`url` varchar(100) NOT NULL,
`time` datetime NOT NULL,
`host` varchar(100) NOT NULL,
`vote_up` int(255) NOT NULL,
`vote_down` int(255) NOT NULL,
`title` varchar(1000) NOT NULL,
`user_id_u` int(255) NOT NULL,
`account_name` varchar(255) NOT NULL,
`author` varchar(255) NOT NULL,
`type` enum('a','b','c') NOT NULL,
`data` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for table `updates`
--
ALTER TABLE `updates`
ADD PRIMARY KEY (`update_id`),
ADD KEY `user_id_fk_upd` (`user_id_u`),
ADD KEY `user_id_fk_upd_2` (`user_id_u`),
ADD KEY `user_id_u` (`user_id_u`),
ADD KEY `user_id_u_2` (`user_id_u`),
ADD KEY `update_id` (`update_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `updates`
--
ALTER TABLE `updates`
MODIFY `update_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=399;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `updates`
--
ALTER TABLE `updates`
ADD CONSTRAINT `updates_ibfk_1` FOREIGN KEY (`user_id_u`) REFERENCES `user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;