product_images table

The product_images table in the E-commerce Database Schema schema has 6 columns, keyed by id, with 2 foreign keys to products and product_variants.

variant_id null means the image belongs to the product as a whole.

Columns (6)

Columns of the product_images table
ColumnTypeConstraintsDescription
iduuidprimary key
product_iduuidnot null, references products.id
variant_iduuidreferences product_variants.id
urlvarchar(500)not null
alt_textvarchar(255)
positionintegernot null

Relationships