Skip to content

Instantly share code, notes, and snippets.

@Opencontent
Created January 17, 2019 15:05
Show Gist options
  • Save Opencontent/e4c16f79a57cc27f316e7e5a9a437742 to your computer and use it in GitHub Desktop.
Save Opencontent/e4c16f79a57cc27f316e7e5a9a437742 to your computer and use it in GitHub Desktop.
ALTER TABLE eztags ADD main_language_id integer not null default 0;
ALTER TABLE eztags ADD language_mask integer not null default 0;
-- ALTER TABLE eztags_attribute_link ADD priority integer not null default 0;
DROP index IF EXISTS eztags_keyword;
CREATE TABLE eztags_keyword (
keyword_id integer not null default 0,
language_id integer not null default 0,
keyword varchar(255) NOT NULL default '',
locale varchar(255) NOT NULL default '',
status integer not null default 0,
PRIMARY KEY (keyword_id, locale)
);
UPDATE ezcontentclass_attribute
SET data_text1 = 'Default'
WHERE data_type_string = 'eztags'
AND data_int2 = 0;
UPDATE ezcontentclass_attribute
SET data_text1 = 'Select'
WHERE data_type_string = 'eztags'
AND data_int2 = 1;
CREATE INDEX idx_eztags_keyword ON eztags (keyword);
CREATE INDEX idx_eztags_keyword_id ON eztags (keyword,id);
CREATE INDEX idx_eztags_attr_link_keyword_id ON eztags_attribute_link (keyword_id);
CREATE INDEX idx_eztags_attr_link_kid_oaid_oav ON eztags_attribute_link (keyword_id,objectattribute_id,objectattribute_version);
CREATE INDEX idx_eztags_attr_link_kid_oid ON eztags_attribute_link (keyword_id,object_id);
CREATE INDEX idx_eztags_attr_link_oaid_oav ON eztags_attribute_link (objectattribute_id,objectattribute_version);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment