mirror of
https://github.com/wassname/HackFlowy.git
synced 2026-07-14 01:10:13 +08:00
Initial Sequelize integration.
Added orm module to abstract Sequelize usage to some degree. ORM module handles the configuration and instantiation of Sequelize. Models are defined and instantiated from models/* Tested only against SQLite. Faily new to nodejs so I probably messed up with something.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
var Sequelize = require('sequelize');
|
||||
|
||||
module.exports = {
|
||||
instance: function(orm) {
|
||||
task = orm.define('Tasks', {
|
||||
content: Sequelize.STRING,
|
||||
parent: Sequelize.INTEGER,
|
||||
is_completed: Sequelize.BOOLEAN
|
||||
});
|
||||
|
||||
orm.sync();
|
||||
return task;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user