mirror of
https://github.com/wassname/HackFlowy.git
synced 2026-06-27 16:00:04 +08:00
ebab3b60a8
Fixed seed/initial_tasks data which created tasks in a non-sequential order (tested on Postgres) Added production-like example configuration
18 lines
502 B
JavaScript
18 lines
502 B
JavaScript
var Sequelize = require('sequelize');
|
|
|
|
module.exports = {
|
|
instance: function(orm) {
|
|
task = orm.define('Tasks', {
|
|
id : {type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true},
|
|
content : {type: Sequelize.TEXT, allowNull: false},
|
|
parent : Sequelize.INTEGER,
|
|
isCompleted: Sequelize.BOOLEAN,
|
|
createdAt : Sequelize.DATE,
|
|
updatedAt : Sequelize.DATE
|
|
});
|
|
|
|
orm.sync();
|
|
return task;
|
|
}
|
|
}
|