Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 3 Lnai 8726

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448440, 978-3662448441

More Books

Students also viewed these Databases questions

Question

7. Identify four antecedents that influence intercultural contact.

Answered: 1 week ago

Question

5. Describe the relationship between history and identity.

Answered: 1 week ago