Advertisement
ran5000

Untitled

Sep 25th, 2012
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 3.37 KB | None | 0 0
  1. Create Table: CREATE TABLE `s_relations` (
  2.   `id` int(11) NOT NULL AUTO_INCREMENT,
  3.   `source_persona_id` int(11) NOT NULL,
  4.   `relation_type` int(11) NOT NULL,
  5.   `message_id` int(11) DEFAULT NULL,
  6.   `reply_to_message_id` int(11) DEFAULT NULL,
  7.   `reshare_of_message_id` int(11) DEFAULT NULL,
  8.   `target_object_id` int(11) DEFAULT NULL,
  9.   `target_persona_id` int(11) DEFAULT NULL,
  10.   `created_at` datetime DEFAULT NULL,
  11.   `updated_at` datetime DEFAULT NULL,
  12.   `sent_at` int(11) unsigned NOT NULL DEFAULT '0',
  13.   PRIMARY KEY (`id`,`sent_at`),
  14.   UNIQUE KEY `unique_target_persona` (`source_persona_id`,`relation_type`,`message_id`,`target_persona_id`,`sent_at`),
  15.   UNIQUE KEY `unique_target_object` (`source_persona_id`,`relation_type`,`message_id`,`target_object_id`,`sent_at`),
  16.   KEY `message_id_index` (`message_id`),
  17.   KEY `reshare_of_message_id_index` (`reshare_of_message_id`),
  18.   KEY `reply_to_message_id_index` (`reply_to_message_id`),
  19.   KEY `source_and_target_object_index` (`source_persona_id`,`target_object_id`),
  20.   KEY `source_target_persona_index` (`source_persona_id`,`target_persona_id`),
  21.   KEY `target_persona_relation_type_message_id_index` (`target_persona_id`,`relation_type`,`message_id`),
  22.   KEY `sent_at_index` (`sent_at`),
  23.   KEY `source_persona_sent_at_index` (`source_persona_id`,`sent_at`),
  24.   KEY `target_persona_sent_at_index` (`target_persona_id`,`sent_at`),
  25.   KEY `target_object_sent_at_index` (`target_object_id`,`sent_at`)
  26. ) ENGINE=InnoDB AUTO_INCREMENT=258275496 DEFAULT CHARSET=latin1
  27. /*!50100 PARTITION BY RANGE (sent_at)
  28. (PARTITION p082011 VALUES LESS THAN (1314835200) ENGINE = InnoDB,
  29.  PARTITION p092011 VALUES LESS THAN (1317427200) ENGINE = InnoDB,
  30.  PARTITION p102011 VALUES LESS THAN (1320105600) ENGINE = InnoDB,
  31.  PARTITION p112011 VALUES LESS THAN (1322697600) ENGINE = InnoDB,
  32.  PARTITION p122011 VALUES LESS THAN (1325376000) ENGINE = InnoDB,
  33.  PARTITION p012012 VALUES LESS THAN (1328054400) ENGINE = InnoDB,
  34.  PARTITION p022012 VALUES LESS THAN (1330560000) ENGINE = InnoDB,
  35.  PARTITION p032012 VALUES LESS THAN (1333238400) ENGINE = InnoDB,
  36.  PARTITION p042012 VALUES LESS THAN (1335830400) ENGINE = InnoDB,
  37.  PARTITION p052012 VALUES LESS THAN (1338508800) ENGINE = InnoDB,
  38.  PARTITION p072012 VALUES LESS THAN (1343779200) ENGINE = InnoDB,
  39.  PARTITION p082012 VALUES LESS THAN (1346457600) ENGINE = InnoDB,
  40.  PARTITION p092012 VALUES LESS THAN (1349049600) ENGINE = InnoDB,
  41.  PARTITION p102012 VALUES LESS THAN (1351728000) ENGINE = InnoDB,
  42.  PARTITION p112012 VALUES LESS THAN (1354320000) ENGINE = InnoDB,
  43.  PARTITION p122012 VALUES LESS THAN (1356998400) ENGINE = InnoDB,
  44.  PARTITION p012013 VALUES LESS THAN (1359676800) ENGINE = InnoDB,
  45.  PARTITION p022013 VALUES LESS THAN (1362096000) ENGINE = InnoDB,
  46.  PARTITION p032013 VALUES LESS THAN (1364774400) ENGINE = InnoDB,
  47.  PARTITION p042013 VALUES LESS THAN (1367366400) ENGINE = InnoDB,
  48.  PARTITION p052013 VALUES LESS THAN (1370044800) ENGINE = InnoDB,
  49.  PARTITION p062013 VALUES LESS THAN (1372636800) ENGINE = InnoDB,
  50.  PARTITION p072013 VALUES LESS THAN (1375315200) ENGINE = InnoDB,
  51.  PARTITION p082013 VALUES LESS THAN (1377993600) ENGINE = InnoDB,
  52.  PARTITION p092013 VALUES LESS THAN (1380585600) ENGINE = InnoDB,
  53.  PARTITION p102013 VALUES LESS THAN (1383264000) ENGINE = InnoDB,
  54.  PARTITION p112013 VALUES LESS THAN (1385856000) ENGINE = InnoDB,
  55.  PARTITION p062012 VALUES LESS THAN (1395856000) ENGINE = InnoDB)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement