Add categories to our travel itinerary app to help organise attractions. Each category can have multiple attractions, and each attraction belongs to a single category.
1.
Create a new table categories
2.
Add a foreign key category_id to the attractions table to associate categories with attractions.
Create Category
Sample Command:
node index.mjs add-category museum
Command Template:
node index.mjs add-category <CATEGORY>
Create Attraction with Category
Sample Command:
node index.mjs add-attrac "Christmas PH" "Art Science Museum" museum