Db schema migrations in MySQL I am wondering what is the correct way to arrange a db schema migration script/scripts.

My current script is a c# code made out of {version}.cs files which I am running one by one in an incremental way.


Is it recommended to put your schema migrations script in a C# code or should I always keep it as pure sql file?
When using Alter table I need to add a condition and check whether the Alter had been done already before. So if creating a SQL script I should add something like IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS 
       WHERE TABLE_SCHEMA = 'db_name' AND TABLE_NAME='table' AND column_name='col'). looks like a lot of code, Is this the way to go?
One of the guys suggested using a Stored-procedure and write the schema migration script inside it to leverage on the advantages of a Stored-procedure, What do you think about this approach?
There is obviously no rule, but it's probably a good idea to be consistent. It's also a question of whether these schema changes will be executed by someone perhaps less skilled in running SQL scripts, e.g. if the database and its application is a product you're distributing to others.
While MariaDB supports statements like ALTER TABLE my_table DROP COLUMN IF EXISTS col_name; (see here) , MySQL doesn't have this. You could create a stored procedure to do this, perhaps something like this.
Stored procedures are great for a number of tasks, but this sounds like more work than it's worth. I won't reject the idea completely, as it all depends on your specific use-cases. When migrating big tables you may instead want to use a tool like pt-online-schema-change in Percona Toolkit.