aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/update/pre003464-1-intezmeny.sql
blob: 2de741c988eedd770949e18bfc6b98912a8229d7 (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_3464 $$
CREATE PROCEDURE upgrade_database_3464()
BEGIN
IF EXISTS (
    SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='zaroJegy' AND COLUMN_NAME='_tanev'
) THEN
    alter table zaroJegy DROP `_tanev`;
END IF;
IF EXISTS (
    SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='zaroJegy' AND COLUMN_NAME='_szemeszter'
) THEN
    alter table zaroJegy DROP `_szemeszter`;
END IF;

END $$
DELIMITER ; $$
CALL upgrade_database_3464();