mirror of
https://github.com/Ratstail91/sineQL.git
synced 2025-11-29 10:44:28 +11:00
Moved to using a real database ORM for testing
This commit is contained in:
12
test/database/models/index.js
Normal file
12
test/database/models/index.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const sequelize = require('..');
|
||||
const authors = require('./authors');
|
||||
const books = require('./books');
|
||||
|
||||
books.belongsTo(authors, { as: 'author' }); //books now reference the authorId
|
||||
|
||||
sequelize.sync();
|
||||
|
||||
module.exports = {
|
||||
authors,
|
||||
books
|
||||
};
|
||||
Reference in New Issue
Block a user