building out admin portal

This commit is contained in:
Mikayla Dobson
2022-09-21 16:59:05 -05:00
parent fbaca9b97d
commit 905b3266a3
5 changed files with 42 additions and 8 deletions

View File

@@ -37,7 +37,8 @@ require('dotenv').config({ path: "../.env" });
CREATE TABLE IF NOT EXISTS category (
id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY NOT NULL,
name VARCHAR NOT NULL,
description VARCHAR NOT NULL
description VARCHAR NOT NULL,
is_product_subset BOOLEAN NOT NULL
);
`;
@@ -63,6 +64,8 @@ require('dotenv').config({ path: "../.env" });
let status;
try {
await client.query("DROP SCHEMA public CASCADE; CREATE SCHEMA public;");
for (let q of allQueries) {
await client.query(q);
}