aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/update/pre003531-4-intezmeny.sql
blob: 7a37cd83a14a1b25e4fe5509b7a8581d617276bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
DELIMITER $$
DROP PROCEDURE IF EXISTS upgrade_database_3531d $$
CREATE PROCEDURE upgrade_database_3531d()
BEGIN
IF EXISTS (
    SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='kepzesOraszam' AND COLUMN_NAME='evfolyam'
) THEN
    alter table `kepzesOraszam` DROP `evfolyam`;
END IF;
IF EXISTS (
    SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='kepzesOraterv' AND COLUMN_NAME='evfolyam'
) THEN
    alter table `kepzesOraterv` drop key `kot_kulcs`;
    alter table `kepzesOraterv` DROP `evfolyam`;
END IF;
END $$
DELIMITER ;
CALL upgrade_database_3531d();