blob: fbcc21e3cd0f721f219bf6a7bfd31aa10f450bbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
DELIMITER $$
DROP PROCEDURE IF EXISTS upgrade_database_3787 $$
CREATE PROCEDURE upgrade_database_3787()
BEGIN
IF NOT EXISTS (
SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='tovabbkepzes' AND COLUMN_NAME='kategoria'
) THEN
alter table tovabbkepzes ADD kategoria ENUM('diploma', 'szakvizsga', 'akkreditált', 'egyéb') DEFAULT 'egyéb';
update tovabbkepzes set kategoria='akkreditált' WHERE akkreditalt=1;
update tovabbkepzes set kategoria='egyéb' WHERE akkreditalt=0;
END IF;
END $$
DELIMITER ; $$
CALL upgrade_database_3787();
|