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)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| product_id | uuid | not null, references products.id | |
| variant_id | uuid | references product_variants.id | |
| url | varchar(500) | not null | |
| alt_text | varchar(255) | ||
| position | integer | not null |
Relationships
product_images.product_idreferencesproducts.idproduct_images.variant_idreferencesproduct_variants.id