18 lines
456 B
SQL
18 lines
456 B
SQL
USE `cpone_middleware`;
|
|
|
|
SET @drop_default_column = IF(
|
|
EXISTS(
|
|
SELECT 1
|
|
FROM information_schema.columns
|
|
WHERE table_schema = DATABASE()
|
|
AND table_name = 'hospitals'
|
|
AND column_name = 'is_default'
|
|
),
|
|
'ALTER TABLE hospitals DROP COLUMN is_default',
|
|
'SELECT 1'
|
|
);
|
|
|
|
PREPARE drop_default_statement FROM @drop_default_column;
|
|
EXECUTE drop_default_statement;
|
|
DEALLOCATE PREPARE drop_default_statement;
|