Bugfixing alias_view on upgrades ( cf Ticket #1489 )
This commit is contained in:
parent
48f77aeed6
commit
659deeedd4
|
@ -500,6 +500,7 @@ install/upgrades/3.0.0~2.sh -text
|
|||
install/upgrades/3.0.0~3.php -text
|
||||
install/upgrades/3.0.0~4.sh -text
|
||||
install/upgrades/3.0.1.php -text
|
||||
install/upgrades/3.0.3~a.sql -text
|
||||
install/upgrades/3.1.0~a.sql -text
|
||||
install/upgrades/3.1.0~b.php -text
|
||||
install/upgrades/README -text
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
CREATE OR REPLACE VIEW `alias_view` AS
|
||||
select concat(`address`.`address`,'@',`domaines`.`domaine`) AS `mail`,
|
||||
concat(if(isnull(`mailbox`.`id`),'',concat(concat(`address`.`address`,'@',`domaines`.`domaine`),'\n')),`recipient`.`recipients`) AS `alias`
|
||||
from (((`recipient` join `address` on((`address`.`id` = `recipient`.`address_id`)))
|
||||
left join `mailbox` on((`mailbox`.`address_id` = `address`.`id`)))
|
||||
join `domaines` on((`domaines`.`id` = `address`.`domain_id`)))
|
||||
where `address`.`enabled` = 1
|
||||
union
|
||||
select distinct concat(`m`.`login`,'@',`v`.`value`) AS `mail`,
|
||||
`m`.`mail` AS `alias`
|
||||
from ((`membres` `m` join `variable` `v`) join `domaines` `d`)
|
||||
where (`v`.`name` = 'mailname_bounce')
|
||||
union
|
||||
select distinct concat('alterncpanel','@',`v`.`value`) AS `mail`,
|
||||
`m`.`mail` AS `alias`
|
||||
from ((`membres` `m` join `variable` `v`) join `domaines` `d`)
|
||||
where (`v`.`name` = 'mailname_bounce' AND `m`.`uid`=2000);
|
||||
|
Loading…
Reference in New Issue