uniqueProductTable contains unique products and their IDs.
less than a minute
This table stores unique products.
|ID of a unique product||0|
|Asset id (see assetTable)||1|
|Time when product was inputted in asset||0|
|Time when product was output of asset||100|
|ID of the product (see productTable)||1|
|True if product is scrap||true|
|Quality class of the product||A|
|ID of the station where the product was processed||Soldering Iron-1|
CREATE TABLE IF NOT EXISTS uniqueProductTable ( uid TEXT NOT NULL, asset_id SERIAL REFERENCES assetTable (id), begin_timestamp_ms TIMESTAMPTZ NOT NULL, end_timestamp_ms TIMESTAMPTZ NOT NULL, product_id TEXT NOT NULL, is_scrap BOOLEAN NOT NULL, quality_class TEXT NOT NULL, station_id TEXT NOT NULL, UNIQUE(uid, asset_id, station_id), CHECK (begin_timestamp_ms < end_timestamp_ms) ); -- creating an index to increase performance CREATE INDEX ON uniqueProductTable (asset_id, uid, station_id);
Last modified May 25, 2023: feat: added notice that installation may take a while (#136) (5e5a916)