mail_template

Description

Mail template data.

Definition

Column Type Constraint Description
shop TEXT PRIMARY KEY Shop ID. (shop.username)
id INTEGER Identifier.
name TEXT NOT NULL Name of template. Because of it is just displaying to select on administration page, not multilingualized.
from TEXT NOT NULL Mail address of sender.
reply_to TEXT NOT NULL Mail address to reply.

Related tables

Query

CREATE TABLE mail_template(
shop     TEXT,
id       INTEGER,
name     TEXT    NOT NULL,
"from"   TEXT    NOT NULL,
reply_to TEXT    NOT NULL,
PRIMARY KEY(shop, id)
);

mail_template_content

Description

Multilingualized subject, header and footer of mail_template.

Definition

Column Type Constraint Description
shop TEXT PRIMARY KEY Shop ID. (shop.username)
template_id INTEGER Template ID. (mail_template.id)
lang TEXT Language key.
subject TEXT NOT NULL Subject of mail.
header TEXT NOT NULL Header part of body.
footer TEXT NOT NULL Footer part of body above signature.

Query

CREATE TABLE mail_template_content(
shop         TEXT,
template_id  INTEGER,
lang         TEXT,
subject      TEXT    NOT NULL,
header       TEXT    NOT NULL,
footer       TEXT    NOT NULL,
PRIMARY KEY(shop, template_id, lang)
);