Advertisement
Guest User

Untitled

a guest
Jan 15th, 2016
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE IF NOT EXISTS `question` (
  2.   `id` int(11) NOT NULL,
  3.   `message` longtext COLLATE utf8_unicode_ci NOT NULL,
  4.   `emailaddress` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  5.   `employee_id` int(11) DEFAULT NULL,
  6.   `created_at` datetime DEFAULT NULL,
  7.   `modified_at` datetime DEFAULT NULL
  8. )ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  9. CREATE TABLE IF NOT EXISTS `employee` (
  10.   `id` int(11) NOT NULL,
  11.   `firstname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  12.   `lastname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  13.   `company_id` int(11) NOT NULL
  14. )ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  15. CREATE TABLE IF NOT EXISTS `company` (
  16.   `id` int(11) NOT NULL,
  17.   `company_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL
  18. )ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  19. CREATE TABLE IF NOT EXISTS `onetime_item` (
  20.   `item_id` int(11) NOT NULL,
  21.   `item_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  22.   `item_amount` int(10) NOT NULL,
  23.   `company_id` int(11) NOT NULL,
  24.   `employee_id` int(11) NOT NULL,
  25.   `date` date NOT NULL
  26. )ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  27. INSERT INTO employee (id, firstname, lastname ,company_id) VALUES (1, 'John', 'Smith', 1);
  28. INSERT INTO company (id, company_name) VALUES (1, 'Test Company');
  29. INSERT INTO question (id, message, emailaddress, employee_id, created_at, modified_at) VALUES ('1', 'test 1', 'tes@test.com', 1, '2016-1-14', NULL), ('2', 'test 2', 'tes@testing.com', 1, '2016-1-15', NULL);
  30. INSERT INTO onetime_item (item_id, item_name, item_amount, company_id, employee_id) VALUES (1, 'Car', 1, 1, 1), (2, 'Trip to New York', 15, 1, 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement