Facebook
From Innocent Motmot, 1 Year ago, written in SQL.
This paste is a reply to Re: Query - SEPT1 from Harmless Motmot - view diff
Embed
Download Paste or View Raw
Hits: 152
  1. CREATE TABLE `catalogue_shares` (
  2.   `id` INT(11) NOT NULL AUTO_INCREMENT,
  3.   `superagent_id` INT(11) NOT NULL DEFAULT '0',
  4.   `city` VARCHAR(191) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
  5.   `created_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  6.   `updated_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  7.   PRIMARY KEY (`id`),
  8.   KEY `superagent_id` (`superagent_id`),
  9.   KEY `city` (`city`),
  10.   KEY `created_at` (`created_at`)
  11. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  12.  
  13. CREATE TABLE `catalogue_share_details` (
  14.   `id` INT(11) NOT NULL AUTO_INCREMENT,
  15.   `catalogue_share_id` INT(11) NOT NULL DEFAULT '0',
  16.   `product_id` INT(11) NOT NULL DEFAULT '0',
  17.   `product_attribute_id` INT(11) NOT NULL DEFAULT '0',
  18.   `bundle_id` INT(11) NOT NULL DEFAULT '0',
  19.   `created_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
  20.   `updated_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  21.   PRIMARY KEY (`id`),
  22.   KEY `catalogue_share_id` (`catalogue_share_id`),
  23.   KEY `product_id` (`product_id`),
  24.   KEY `product_attribute_id` (`product_attribute_id`),
  25.   KEY `bundle_id` (`bundle_id`),
  26.   KEY `created_at` (`created_at`)
  27. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  28.  
  29.  
  30. ALTER TABLE orders ADD is_routing tinyint DEFAULT 0 NOT NULL;