picture

Description

Product picture data.

Definition

Column Type Constraint Description
shop TEXT PRIMARY KEY Shop ID. (shop.username)
product_id INTEGER Product ID. (product.id)
index INTEGER Index of pictures. (0-origin)
filename TEXT NOT NULL Relative file path from each product picture's folder including file extension.
mime TEXT NOT NULL MIME type.
alt TEXT Alternation text.
disabled INTEGER NOT NULL Whether the picture is disabled or not.
  • 0: enabled
  • 1: disabled

Query

CREATE TABLE picture(
shop        TEXT,
product_id  INTEGER,
index       INTEGER,
filename    TEXT     NOT NULL,
mime        TEXT     NOT NULL,
alt         TEXT,
disabled    INTEGER  NOT NULL,
PRIMARY KEY(shop, product_id, index)
);