Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.56 KB | None | 0 0
  1. CREATE TABLE IF NOT EXISTS `codes` (
  2.   `id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
  3.   `code` CHAR(8) NOT NULL,
  4.   `user_id` INT(4) UNSIGNED NOT NULL,
  5.   `created_at` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  6.   PRIMARY KEY (`id`),
  7.   UNIQUE KEY `code` (`code`)
  8. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
  9.  
  10. --
  11. -- Dumping data for table `magnum_codes`
  12. --
  13.  
  14. INSERT INTO `codes` (`id`, `code`, `user_id`, `created_at`) VALUES
  15. (1, 'ABCD1234', 0, '0000-00-00 00:00:00'),
  16. (2, 'ABCD1235', 0, '0000-00-00 00:00:00');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement