Basically queries was right, table structure is incorrect

tags  | CREATE TABLE `tags` (
  `tag_id` int(11) unsigned NOT NULL COMMENT 'The unique identifier of the 
tag', -> *should be id? (because we interface looking for id ...)*
  `name` varchar(127) NOT NULL COMMENT 'The display name of the tag',
  `account_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`tag_id`),
  UNIQUE KEY `idx_name` (`name`,`account_id`),
  KEY `fk_tags_clients_id` (`account_id`),
  CONSTRAINT `fk_tags_clients_id` FOREIGN KEY (`account_id`) REFERENCES 
`clients` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Tags'

Also table account_tag_values F KEY: CONSTRAINT 
`fk_account_tag_values_tags` FOREIGN KEY (`tag_id`) REFERENCES `tags` 
(`id`) ON UPDATE NO ACTION

-- 
You received this message because you are subscribed to the Google Groups 
"scalr-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to