alter table ezin_articles change bodytext bodytext longtext; alter table ezin_articles change access_key access_key varchar(64); alter table ezin_articles change template_key template_key varchar(64); alter table ezin_sections change access_key access_key varchar(64); alter table ezin_sections change template_key template_key varchar(64); -- -- Common key renaming/additions -- alter table ezin_articles add key ezin_articles_author_id (author_id); alter table ezin_articles add key ezin_articles_section_id (section_id); alter table ezin_articles add key ezin_articles_bind_lang (bind_lang); alter table ezin_articles add key ezin_articles_bind_theme (bind_theme); alter table ezin_articles add key ezin_articles_status (status); alter table ezin_articles add key ezin_articles_datetime (datetime); alter table ezin_articles add key ezin_articles_access_key (access_key); alter table ezin_articles add key ezin_articles_template_key (template_key); alter table ezin_cache add key ezin_cache_timestamp (timestamp); alter table ezin_config add key ezin_config_type (type); alter table ezin_config_info add key ezin_config_info_ord (ord); alter table ezin_counts_temp drop key type_id; alter table ezin_counts_temp drop key ip; alter table ezin_counts_temp add key ezin_counts_temp_type_id (type_id); alter table ezin_counts_temp add key ezin_counts_temp_timestamp (timestamp); alter table ezin_counts_temp add key ezin_counts_temp_ip (ip); alter table ezin_editorials add key ezin_editorials_section_id (section_id); alter table ezin_editorials add key ezin_editorials_datetime (datetime); alter table ezin_feedback_data drop key feedback_id; alter table ezin_feedback_data drop key field; alter table ezin_feedback_data add key ezin_feedback_data_feedback_id (feedback_id); alter table ezin_feedback_data add key ezin_feedback_data_field (field); alter table ezin_feedbacks add key ezin_feedbacks_section_id (section_id); alter table ezin_feedbacks add key ezin_feedbacks_datetime (datetime); alter table ezin_feedbacks add key ezin_feedbacks_ip (ip); alter table ezin_feedbacks add key ezin_feedbacks_user_agent (user_agent); alter table ezin_messages add key ezin_messages_parent (parent); alter table ezin_messages add key ezin_messages_article_id (article_id); alter table ezin_messages add key ezin_messages_datetime (datetime); alter table ezin_messages add key ezin_messages_ip (ip); alter table ezin_roles add key ezin_roles_name (name); alter table ezin_users add key ezin_users_author_id (author_id); alter table ezin_users add key ezin_users_role_id (role_id); alter table ezin_sections add key ezin_sections_author_id (author_id); alter table ezin_sections add key ezin_sections_type (type); alter table ezin_sections add key ezin_sections_lang (lang); alter table ezin_sections add key ezin_sections_bind_lang (bind_lang); alter table ezin_sections add key ezin_sections_ord (ord); alter table ezin_sections add key ezin_sections_a_limit (a_limit); alter table ezin_sections add key ezin_sections_access_key (access_key); alter table ezin_sections add key ezin_sections_template_key (template_key); alter table ezin_sessions add key ezin_sessions_session_id (session_id); alter table ezin_sessions add key ezin_sessions_username (username); alter table ezin_sessions add key ezin_sessions_password (password); alter table ezin_sessions add key ezin_sessions_login (login); alter table ezin_sessions add key ezin_sessions_logout (logout); alter table ezin_sessions add key ezin_sessions_status (status); alter table ezin_sessions add key ezin_sessions_ip (ip); alter table ezin_sessions add key ezin_sessions_user_agent (user_agent); -- -- Primary key alternations -- alter table ezin_articles add key tmp_key (id); alter table ezin_articles drop primary key; alter table ezin_articles add primary key ezin_articles_pk (id); alter table ezin_articles drop key tmp_key; alter table ezin_authors add key tmp_key (id); alter table ezin_authors drop primary key; alter table ezin_authors add primary key ezin_authors_pk (id); alter table ezin_authors drop key tmp_key; alter table ezin_cache add key tmp_key (id); alter table ezin_cache drop primary key; alter table ezin_cache add primary key ezin_cache_pk (id); alter table ezin_cache drop key tmp_key; alter table ezin_config drop primary key; alter table ezin_config add primary key ezin_config_pk (a_key); alter table ezin_config_info drop primary key; alter table ezin_config_info add primary key ezin_config_info_pk (a_key); alter table ezin_editorials add key tmp_key (id); alter table ezin_editorials drop primary key; alter table ezin_editorials add primary key ezin_editorials_pk (id); alter table ezin_editorials drop key tmp_key; alter table ezin_feedbacks add key tmp_key (id); alter table ezin_feedbacks drop primary key; alter table ezin_feedbacks add primary key ezin_feedbacks_pk (id); alter table ezin_feedbacks drop key tmp_key; alter table ezin_messages add key tmp_key (id); alter table ezin_messages drop primary key; alter table ezin_messages add primary key ezin_messages_pk (id); alter table ezin_messages drop key tmp_key; alter table ezin_roles add key tmp_key (id); alter table ezin_roles drop primary key; alter table ezin_roles add primary key ezin_roles_pk (id); alter table ezin_roles drop key tmp_key; alter table ezin_sections add key tmp_key (id); alter table ezin_sections drop primary key; alter table ezin_sections add primary key ezin_sections_pk (id); alter table ezin_sections drop key tmp_key; alter table ezin_sessions add key tmp_key (id); alter table ezin_sessions drop primary key; alter table ezin_sessions add primary key ezin_sessions_pk (id); alter table ezin_sessions drop key tmp_key; alter table ezin_users drop key username; alter table ezin_users add key tmp_key (id); alter table ezin_users drop primary key; alter table ezin_users add primary key ezin_users_pk (id); alter table ezin_users drop key tmp_key; alter table ezin_users add unique key ezin_users_username (username); -- -- Configuration changes -- update ezin_config set a_key = 'http_host_allowed' where a_key = 'http_host_excluded';