Question
You will be using the sakila database for this hands-on. Create a new model file for the category table using the sequelize-auto command. This file
You will be using the sakila database for this hands-on. Create a new model file for the "category" table using the sequelize-auto command. This file should be named category.js and put inside of the models folder Change your config.json file to reflect the connection and dialect for the development object Add the code to your app.js to sync your models and Sequelize Step 3 Run the necessary command to create an initial migration with the new category model Add a new column to your category model called default_price that is a decimal type This column will be used for storing default rental prices for movies within that category Use the sequelize-auto-migration command to generate a new migration Run the migration Write the code to display all category names and their default prices. You will need a new hbs file and a get() route Write the code to add a new category to the database Have a field for the category name and the default price You will need to add a form to the hbs file and a post() route Write the code to display a category based on its ID You will need a new hbs file and a get() route using :id
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started