NotParcel/migrations/003_generate_products_table.sql
2024-12-30 11:37:46 -07:00

13 lines
605 B
SQL

CREATE TABLE IF NOT EXISTS products (
id CHAR(36) PRIMARY KEY DEFAULT UUID(),
hubId CHAR(36), -- Hub that the product belongs to
name VARCHAR(128), -- Name of the product
description TEXT, -- Description of the product
devProductID BIGINT NOT NULL, -- Dev Product ID
decalId BIGINT DEFAULT NULL, -- Decal ID
stock BIGINT DEFAULT -1, -- Stock of the product (If enabled)
category VARCHAR(64) DEFAULT NULL, -- Category of the product
file VARCHAR(36) DEFAULT NULL, -- File ID for the product
fileType VARCHAR(16) DEFAULT NULL, -- File type of the product
FOREIGN KEY (hubId) REFERENCES hubs(id)
)