Fix category import

This commit is contained in:
2025-01-25 14:11:38 -05:00
parent e1174b8e63
commit 1694562947
2 changed files with 176 additions and 241 deletions

View File

@@ -68,11 +68,12 @@ CREATE TABLE categories (
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
status VARCHAR(20) DEFAULT 'active',
UNIQUE KEY unique_name_type (name, type),
UNIQUE KEY unique_category (id),
FOREIGN KEY (parent_id) REFERENCES categories(id),
INDEX idx_parent (parent_id),
INDEX idx_type (type),
INDEX idx_status (status)
INDEX idx_status (status),
INDEX idx_name_type (name, type)
) ENGINE=InnoDB;
-- Create vendor_details table