text: 'use strict';
  
  module.exports = {
      up: async (queryInterface, Sequelize) => {
          await queryInterface.createTable( 'shopping_list', { 
              id: {
                  type: Sequelize.INTEGER,
                  autoIncrement: true,
                  primaryKey: true,
                  allowNull: false
              },
              amount: {
                  type: Sequelize.INTEGER,
                  allowNull: false
              },
              price_applied: {
                  type: Sequelize.DECIMAL(6,2),
                  allowNull: false
              },
              order_id: {
                  type: Sequelize.INTEGER,
                  allowNull: false,
                  references: {
                      model: 'orders',
                      key: 'id'
                  }
              },
              product_id: {
                  type: Sequelize.INTEGER,
                  allowNull: false,
                  references: {
                      model: 'products',
                      key: 'id'
                  }
              }
          })
      },
  
      down: async (queryInterface, Sequelize) => {
          await queryInterface.dropTable('shopping_list');
      }
  };