ready to test

Testing

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-06-22 10:06:58 +08:00
parent bf48c95467
commit 439bb33f77
189 changed files with 17559 additions and 686 deletions
@@ -0,0 +1,28 @@
'use strict';
// Wires up the bare product_id and category_id columns that were left
// as plain integers in migration 000008.
module.exports = {
async up(queryInterface) {
await queryInterface.addConstraint('course_products', {
fields: ['product_id'],
type: 'foreign key',
name: 'fk_course_products_product_id',
references: { table: 'products', field: 'id' },
onDelete: 'CASCADE',
});
await queryInterface.addConstraint('course_product_categories', {
fields: ['category_id'],
type: 'foreign key',
name: 'fk_course_product_categories_category_id',
references: { table: 'categories', field: 'id' },
onDelete: 'CASCADE',
});
},
async down(queryInterface) {
await queryInterface.removeConstraint('course_products', 'fk_course_products_product_id');
await queryInterface.removeConstraint('course_product_categories', 'fk_course_product_categories_category_id');
},
};