
START TRANSACTION;

DROP TABLE IF EXISTS `users_classes`;
CREATE TABLE IF NOT EXISTS `users_classes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `class_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`,`class_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;


INSERT INTO `fields` VALUES (NULL, 'lblCourses', 'backend', 'Label / Courses', 'script', NULL);
SET @id := (SELECT LAST_INSERT_ID());
INSERT INTO `multi_lang` VALUES (NULL, @id, 'pjField', '1', 'title', 'Courses', 'script');

COMMIT;