DFF
--
-- Database: `codeigniter_chat`DFF
--
-- --------------------------------------------------------
--
-- Table structure for table `chat_messages`
--
CREATE TABLE `chat_messages` (
`chat_messages_id` int(11) NOT NULL,
`sender_id` int(11) NOT NULL,
`receiver_id` int(11) NOT NULL,
`chat_messages_text` text NOT NULL,
`chat_messages_status` enum('no','yes') NOT NULL,
`chat_messages_datetime` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `chat_request`
--
CREATE TABLE `chat_request` (
`chat_request_id` int(11) NOT NULL,
`sender_id` int(11) NOT NULL,
`receiver_id` int(11) NOT NULL,
`chat_request_status` enum('Accept','Reject') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `chat_user`
--
CREATE TABLE `chat_user` (
`user_id` int(11) NOT NULL,
`login_oauth_uid` varchar(100) NOT NULL,
`first_name` varchar(250) NOT NULL,
`last_name` varchar(250) NOT NULL,
`email_address` varchar(250) NOT NULL,
`profile_picture` varchar(250) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `login_data`
--
CREATE TABLE `login_data` (
`login_data_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`last_activity` datetime NOT NULL,
`is_type` enum('no', 'yes') NOT NULL
`receiver_user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `chat_messages`
--
ALTER TABLE `chat_messages`
ADD PRIMARY KEY (`chat_messages_id`);
--
-- Indexes for table `chat_request`
--
ALTER TABLE `chat_request`
ADD PRIMARY KEY (`chat_request_id`);
--
-- Indexes for table `chat_user`
--
ALTER TABLE `chat_user`
ADD PRIMARY KEY (`user_id`);
--
-- Indexes for table `login_data`
--
ALTER TABLE `login_data`
ADD PRIMARY KEY (`login_data_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `chat_messages`
--
ALTER TABLE `chat_messages`
MODIFY `chat_messages_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `chat_request`
--
ALTER TABLE `chat_request`
MODIFY `chat_request_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `chat_user`
--
ALTER TABLE `chat_user`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `login_data`
--
ALTER TABLE `login_data`
MODIFY `login_data_id` int(11) NOT NULL AUTO_INCREMENT;