I figure this is very easy, but I am trying to run this command only if those columns already don’t exist:
ALTER TABLE `surveytable` ADD IF NOT EXISTS Survey_Name_Qualtrics VARCHAR(20);
ALTER TABLE `surveytable` ADD IF NOT EXISTS Survey_URL_Qualtrics VARCHAR(600);
This is the code that i use, i dont think you can use if not exists on a ALTER column.
An alternative you can watch for the error you get if you try to insert a column that already exists, i think its 1062. And handle the error.
Of course the better way is to not get the error in the first place.