 --
 
 --
+-- Constraints for table `registration_confirmations`
+--
+ALTER TABLE `registration_confirmations`
+  ADD CONSTRAINT `registration_confirmations_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
 -- Constraints for table `study_buddies`
 --
 ALTER TABLE `study_buddies`

-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 08, 2016 at 06:41 PM
-- Server version: 5.5.32
-- PHP Version: 5.4.16


-- --------------------------------------------------------

--
-- Table structure for table `registration_confirmations`
--

CREATE TABLE IF NOT EXISTS `registration_confirmations` (
  `user_id` int(11) NOT NULL,
  `random_code` int(6) NOT NULL,
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `study_buddies`
--

