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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!