salix/db/routines/vn2008/views/mail.sql

17 lines
467 B
SQL

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`mail`
AS SELECT `m`.`id` AS `id`,
`m`.`senderFk` AS `senderFk`,
`m`.`recipientFk` AS `recipientFk`,
`m`.`receiver` AS `to`,
`m`.`replyTo` AS `reply_to`,
`m`.`subject` AS `subject`,
`m`.`body` AS `text`,
`m`.`plainTextBody` AS `plainTextBody`,
`m`.`attachment` AS `path`,
`m`.`creationDate` AS `DATE_ODBC`,
`m`.`sent` AS `sent`,
`m`.`status` AS `error`
FROM `vn`.`mail` `m`