ProductVersions table
The ProductVersions table in the FitStack - V2 schema has 13 columns, keyed by Id, with 1 foreign key to Products.
Columns (13)
| Column | Type | Constraints | Description |
|---|---|---|---|
| Id | uuid | primary key, not null | |
| ProductId | uuid | not null, references Products.Id | |
| Version | integer | not null | |
| ChangeReason | character varying(500) | not null | |
| ChangedBy | character varying(100) | ||
| Snapshot | jsonb | not null | |
| IsCurrent | boolean | not null | |
| DataSource | character varying(40) | not null | |
| QualityTier | text | ||
| CreatedAt | timestamp with time zone | not null | |
| ModifiedAt | timestamp with time zone | ||
| IsDeleted | boolean | not null | |
| DeletedAt | timestamp with time zone |
Indexes (2)
(ProductId, Version)unique (IX_ProductVersions_ProductId_Version)(ProductId, IsCurrent)(IX_ProductVersions_ProductId_IsCurrent)
Relationships
ProductVersions.ProductIdreferencesProducts.Id