DROP TABLE foodItem;
DROP TABLE category;
            
CREATE TABLE category ( 
catId           INT NOT NULL 
                GENERATED BY DEFAULT AS IDENTITY
                CONSTRAINT cat_PK PRIMARY KEY,
catName         VARCHAR(256) NOT NULL,
dateCreated     TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE foodItem (
itemId      INT NOT NULL 
            GENERATED BY DEFAULT AS IDENTITY
            CONSTRAINT foodItem_PK PRIMARY KEY,
catId       INT NOT NULL CONSTRAINT cat_FK REFERENCES category,
itemName    VARCHAR(256) NOT NULL,
itemDesc    VARCHAR(4096),
itemImage   VARCHAR(256),
itemPrice   DECIMAL DEFAULT 0,
itemQtyStocked INT DEFAULT 0,
dateCreated TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);           

COMMIT;