DROP TABLE messages_properties;
CREATE TABLE messages_properties (
  message_id int(10) unsigned NOT NULL,
  reply_id smallint(5) unsigned NOT NULL,
  property_key varchar(255) NOT NULL,
  property_value mediumtext NOT NULL,
  UNIQUE KEY message_key(message_id, reply_id, property_key)
)