diff options
Diffstat (limited to 'mayor-orig/update/pre003005-1-mayor_naplo.sql')
-rw-r--r-- | mayor-orig/update/pre003005-1-mayor_naplo.sql | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mayor-orig/update/pre003005-1-mayor_naplo.sql b/mayor-orig/update/pre003005-1-mayor_naplo.sql new file mode 100644 index 00000000..ab75bbdd --- /dev/null +++ b/mayor-orig/update/pre003005-1-mayor_naplo.sql @@ -0,0 +1,15 @@ + +CREATE TABLE `osztalyJelleg` ( + `osztalyJellegId` tinyint(3) unsigned NOT NULL auto_increment, + `kirOsztalyJellegId` tinyint(3) unsigned NOT NULL, + `osztalyJellegNev` varchar(255) NOT NULL, + `erettsegizo` tinyint(3) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`osztalyJellegId`), + CONSTRAINT `osztalyJelleg_ibfk_1` FOREIGN KEY (`kirOsztalyJellegId`) REFERENCES `kirOsztalyJelleg` (`kirOsztalyJellegId`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +insert into osztalyJelleg + select null as osztalyJellegId, kirOsztalyJellegId, kirOsztalyJellegNev as osztalyJellegNev, + if(kirOsztalyJellegId<>1 and kirOsztalyJellegId<>6 and kirOsztalyJellegId<>7,1,0) as erettsegizo from kirOsztalyJelleg; + +insert into osztalyJelleg values (10, 3, '5 évfolyamos gimnázium ny.ek. évfolyam',0); |