dreamjob/update.sql

106 lines
5.0 KiB
MySQL
Raw Normal View History

2014-02-19 00:03:29 +01:00
--
-- Datenbank: `muellersql3`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `mic_dj_job_opening_worker`
--
2014-05-07 11:44:23 +02:00
Update `mic_dj_list_branch` `a` join `mic_dj_list_branch` `d` on `d`.`id` = `a`.`id` set `a`.`name`=replace(`d`.`name`,' ','') where `a`.`name` like ' %'
2014-02-23 09:39:07 +01:00
2014-03-26 19:49:36 +01:00
CREATE TABLE IF NOT EXISTS `mic_dj_jobs_opening_worker` (
2014-02-23 09:39:07 +01:00
`id` int(11) NOT NULL AUTO_INCREMENT,
2014-02-19 00:03:29 +01:00
`opening_id` int(11) NOT NULL,
`worker_id` int(11) NOT NULL,
2014-02-23 09:39:07 +01:00
PRIMARY KEY (`id`),
2014-02-19 00:03:29 +01:00
UNIQUE KEY `opening_id` (`opening_id`,`worker_id`),
2014-03-26 19:49:36 +01:00
KEY `mic_dj_jobs_opening_worker_favOpening` (`opening_id`),
KEY `mic_dj_jobs_opening_worker_favWorker` (`worker_id`)
2014-02-23 09:39:07 +01:00
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
2014-02-19 00:03:29 +01:00
--
-- Tabellenstruktur für Tabelle `mic_dj_account_cmpy` ändern
-- ProCompanyAccount
--
ALTER TABLE `mic_dj_account_cmpy` ADD `pro_user` INT NOT NULL ;
--
-- Constraints der exportierten Tabellen
--
--
-- Constraints der Tabelle `mic_dj_job_opening_worker`
--
2014-03-26 19:49:36 +01:00
ALTER TABLE `mic_dj_jobs_opening_worker`
ADD CONSTRAINT `mic_dj_jobs_opening_worker_favOpening` FOREIGN KEY (`opening_id`) REFERENCES `mic_dj_jobs_opening` (`id`),
ADD CONSTRAINT `mic_dj_jobs_opening_worker_favWorker` FOREIGN KEY (`worker_id`) REFERENCES `mic_dj_account_wrk` (`djaccount_ptr_id`);
2014-03-28 16:22:19 +01:00
-- ACHTUNG:
2014-03-29 21:39:39 +01:00
-- 3/15
2014-03-29 21:35:00 +01:00
update `mic_dj_account_cmpy` left join `mic_dj_list_branch` on `name`=`branch` set `branch`=`mic_dj_list_branch`.`id`;
2014-03-28 16:22:19 +01:00
ALTER TABLE `mic_dj_account_cmpy` CHANGE `branch` `branch_id` INT(11) NOT NULL;
2014-03-29 21:39:39 +01:00
-- 2/4
2014-03-29 21:35:00 +01:00
update `mic_dj_jobs_opening` left join `mic_dj_list_branch` on `name`=`branch` set `branch`=`mic_dj_list_branch`.`id`;
2014-03-28 16:22:19 +01:00
ALTER TABLE `mic_dj_jobs_opening` CHANGE `branch` `branch_id` INT(11) NOT NULL;
2014-03-29 21:39:39 +01:00
2014-03-28 16:22:19 +01:00
-- LOLA
2014-03-29 21:39:39 +01:00
-- 15/70
2014-03-29 21:09:17 +01:00
update `mic_dj_account_isearch` left join `mic_dj_list_job` on `name`=`job` set `job`=`mic_dj_list_job`.`id`
update `mic_dj_account_isearch` left join `mic_dj_list_branch` on `name`=`branch` set `job`=`mic_dj_list_branch`.`id`
ALTER TABLE `mic_dj_account_isearch` CHANGE `branch` `branch_id` INT(11) NOT NULL;
ALTER TABLE `mic_dj_account_isearch` CHANGE `job` `job_id` INT(11) NOT NULL;
ALTER TABLE `mic_dj_account_isearch`
ADD CONSTRAINT `mic_dj_account_isearch_branch` FOREIGN KEY (`branch_id`) REFERENCES `mic_dj_list_branch` (`id`),
ADD CONSTRAINT `mic_dj_account_isearch_job` FOREIGN KEY (`job_id`) REFERENCES `mic_dj_list_job` (`id`);
2014-04-01 20:58:36 +02:00
-- Lebenslauf;
ALTER TABLE `mic_dj_cv_entry` ADD `worker_id` INT(11) NOT NULL AFTER `category_id`;
Update `mic_dj_cv_entry` left join `mic_dj_cv_category` on `mic_dj_cv_category`.`id` = `mic_dj_cv_entry`.`category_id` set `mic_dj_cv_entry`.`worker_id`=`mic_dj_cv_category`.`worker_id`;
Update `mic_dj_cv_entry` left join `mic_dj_cv_category` on `mic_dj_cv_category`.`id` = `mic_dj_cv_entry`.`category_id` set `mic_dj_cv_entry`.`category_id`=`mic_dj_cv_category`.`category_id`;
2014-03-28 16:22:19 +01:00
2014-04-11 16:33:58 +02:00
Update `mic_sys_micacc` `a` join `mic_sys_micacc` `d` on `d`.`id` = `a`.`id` set `a`.`code`=concat('a:',`d`.`code`) where not `a`.`code` like '_:%' and not `a`.`code` ='';
--Update `mic_sys_micacc` `a` join `mic_sys_micacc` `d` on `d`.`id` = `a`.`id` set `a`.`code`=replace(`d`.`code`,'a:','') where `a`.`code` like 'a:\%%'
--Update `mic_sys_micacc` `a` join `mic_sys_micacc` `d` on `d`.`id` = `a`.`id` set `a`.`code`=replace(`d`.`code`,'a:','') where not `a`.`code` like '_:%'
2014-04-13 20:06:35 +02:00
-- cv sortieren
2014-04-13 20:16:11 +02:00
--ALTER TABLE `mic_dj_list_cv-category` ADD `position` INT NOT NULL AFTER `id`;
--UPDATE `mic_dj_list_cv-category` SET `position` = '10' WHERE `mic_dj_list_cv-category`.`id` = 1;
--UPDATE `mic_dj_list_cv-category` SET `position` = '20' WHERE `mic_dj_list_cv-category`.`id` = 9;
--UPDATE `mic_dj_list_cv-category` SET `position` = '30' WHERE `mic_dj_list_cv-category`.`id` = 3;
--UPDATE `mic_dj_list_cv-category` SET `position` = '40' WHERE `mic_dj_list_cv-category`.`id` = 5;
--UPDATE `mic_dj_list_cv-category` SET `position` = '50' WHERE `mic_dj_list_cv-category`.`id` = 6;
--UPDATE `mic_dj_list_cv-category` SET `position` = '60' WHERE `mic_dj_list_cv-category`.`id` = 7;
--UPDATE `mic_dj_list_cv-category` SET `position` = '70' WHERE `mic_dj_list_cv-category`.`id` = 8;
--UPDATE `mic_dj_list_cv-category` SET `position` = '80' WHERE `mic_dj_list_cv-category`.`id` = 2;
--UPDATE `mic_dj_list_cv-category` SET `position` = '90' WHERE `mic_dj_list_cv-category`.`id` = 10;
2014-04-13 20:06:35 +02:00
2014-04-22 16:01:00 +02:00
-- CITY in abhängigkeit
update `mic_dj_account_acc` left join `mic_dj_list_city` on `name`=`city` set `city`=`mic_dj_list_city`.`id`;
update `mic_dj_jobs_opening` left join `mic_dj_list_city` on `name`=`city` set `city`=`mic_dj_list_city`.`id`;
ALTER TABLE `mic_dj_account_acc` CHANGE `city` `city_id` INT(11) NOT NULL;
ALTER TABLE `mic_dj_jobs_opening` CHANGE `city` `city_id` INT(11) NOT NULL;
-- opening:1/5
-- acc:22/71
2014-04-24 16:21:29 +02:00
ALTER TABLE `mic_dj_jobs_application` ADD `subject` VARCHAR( 255 ) NOT NULL AFTER `opening_id`
2014-04-28 22:49:00 +02:00
--- update `mic_sys_micacc` `n` left join `mic_sys_micacc` `o` on o.id=n.id SET n.code = md5(SUBSTRING(o.code, 3, CHAR_LENGTH(o.code)-2)) WHERE n.`code` Like "_:%" and o.`code` Like "_:%"
2014-04-22 16:01:00 +02:00