cmc-sales/go-app/sql/schema/002_products.sql

15 lines
875 B
MySQL
Raw Normal View History

2025-06-24 03:32:28 -07:00
-- Products table schema (extracted from existing database)
CREATE TABLE IF NOT EXISTS `products` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`principle_id` int(11) NOT NULL COMMENT 'Principle FK',
`product_category_id` int(11) NOT NULL,
`title` varchar(255) NOT NULL COMMENT 'This must match the Title in the Excel Costing File',
`description` text NOT NULL,
`model_number` varchar(255) DEFAULT NULL COMMENT 'Part or model number principle uses to identify this product',
`model_number_format` varchar(255) DEFAULT NULL COMMENT '%1% - first item, %2% , second item etc ',
`notes` text DEFAULT NULL COMMENT 'Any notes about this product. Note displayed on quotes',
`stock` tinyint(1) NOT NULL COMMENT 'Stock or Ident',
`item_code` varchar(255) NOT NULL,
`item_description` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;