Skip to content
Snippets Groups Projects
Commit 5d451918 authored by efalcy's avatar efalcy
Browse files

hotline #16240 : modify patch to test if column exist before alter table

parent d250db2d
Branches
Tags
2 merge requests!405Dev #14885 renew result in modal popup,!401Hotline#16240 replay ptach mail suggestions
alter table bib_c_site add column MAIL_SUGGESTIONS varchar(150) null default null AFTER MAIL;
select count(*) into @exist from information_schema.columns
where table_schema = database()
and COLUMN_NAME= 'MAIL_SUGGESTIONS'
and table_name = 'bib_c_site';
set @query = IF(@exist <= 0 , 'ALTER TABLE bib_c_site add column MAIL_SUGGESTIONS varchar(150) null default null AFTER MAIL','select \'Column Exists\' status');
prepare stmt from @query;
EXECUTE stmt;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment