@alexandromt
Try this set of queries
REPLACE INTO oc_t_item_beta (fk_i_item_id, s_phone, i_condition, i_transaction)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction FROM oc_t_item_beta where s_phone <> '';
REPLACE INTO oc_t_item_beta (fk_i_item_id, s_phone, i_condition, i_transaction)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction FROM oc_t_item_alpha where s_phone <> '';
REPLACE INTO oc_t_item_beta (fk_i_item_id, s_phone, i_condition, i_transaction)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction FROM oc_t_item_veronika where s_phone <> '';
First I have put the web in maintenance mode.
Then I changed the table name oc_t_item_beta to oc_t_item_beta2
Then I have been adding these sequences in the database:
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_beta_leales where s_phone <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_beta_leales where i_condition <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_beta_leales where i_transaction <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_beta_leales where i_sold <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_veronika where s_phone <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_veronika where i_condition <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_veronika where i_transaction <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_veronika where i_sold <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_alpha where s_phone <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_alpha where i_condition <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_alpha where i_transaction <> '';
REPLACE INTO oc_t_item_beta_2 (fk_i_item_id, s_phone, i_condition, i_transaction, i_sold)
SELECT fk_i_item_id, s_phone, i_condition, i_transaction, i_sold FROM oc_t_item_alpha where i_sold <> '';
I added the i_sold field to the query ...
And finally I renamed the table, from oc_t_item_beta_2 to oc_t_item_beta
And now old ads created with veronika or alpha have their phones with the new beta theme.
When changing the theme, you have to copy the data from the table of the previous theme, so the phones and the states of the ads will be.
Regards