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