Last active
August 3, 2021 22:48
-
-
Save shahidhk/d4a6231749fbeeede2c916c068d4d1e2 to your computer and use it in GitHub Desktop.
An indicative product table with JSONB column for specs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE product ( | |
uuid UUID NOT NULL DEFAULT gen_random_uuid(), | |
name TEXT NOT NULL, | |
category TEXT NOT NULL, | |
description TEXT NOT NULL, | |
price NUMERIC NOT NULL, | |
spec JSONB NOT NULL, | |
PRIMARY KEY (uuid) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment