nss-day-cohort-46 / rare-server-groovy-goblins

rare-server-groovy-goblins created by GitHub Classroom
0 stars 2 forks source link

Feat: Dr delete a cat #63

Closed notdanross closed 3 years ago

notdanross commented 3 years ago

Description

Modified categories table to hold a deleted property. Added SQL statements to handle updating the deleted category so that the client can stop "deleted" categories from rendering.

Fixes #16

Type of change

Testing Instructions

Please describe the tests required to verify your changes. Provide instructions so PR Tester can check functionality. Please also list any relevant details for your tests

git fetch --all git checkout dr-deleteCat

Run the following SQL queries:

Drop the old categories table: DROP TABLE "Categories";

Create updated table:

CREATE TABLE "Categories" (
  "id" INTEGER PRIMARY KEY AUTOINCREMENT,
  "label" varchar,
  "deleted" bit
);

Add new categories:

INSERT INTO Categories ('label', 'deleted') VALUES ('News', 0);
INSERT INTO Categories ('label', 'deleted') VALUES ('Toast', 0);
INSERT INTO Categories ('label', 'deleted') VALUES ('Baked beans', 0);

Checkout to client side branch to test

Checklist: