diff --git a/db/db.code.version.txt b/db/db.code.version.txt index dd47563..987e7ca 100644 --- a/db/db.code.version.txt +++ b/db/db.code.version.txt @@ -1 +1 @@ -76 +77 diff --git a/db/db.update.77.sql b/db/db.update.77.sql new file mode 100644 index 0000000..10ff00f --- /dev/null +++ b/db/db.update.77.sql @@ -0,0 +1,14 @@ +CREATE TABLE `fairs` ( + `id` int(11) NOT NULL default '0', + `fairname` varchar(64) NOT NULL default '0', + PRIMARY KEY (`fairs_id`) +) TYPE=MyISAM; + +CREATE TABLE `users_fair` ( + `users_id` int(11) NOT NULL default '0', + `fairs_id` int(11) NOT NULL default '0', + PRIMARY KEY (`users_id`) +) TYPE=MyISAM; + +ALTER TABLE `users` CHANGE `types` `types` SET( 'student', 'judge', 'committee', 'volunteer', 'fair' ) NOT NULL ; +