Introduce sequelize migrations to create and migrate database tables and removed database scripts. See http://sequelizejs.com/docs/latest/migrations

Created seeds to initialize database with dummy tasks.
Introduce config module to handle configurations per environment. See https://github.com/lorenwest/node-config
Updated README.md to reflect changes.
This commit is contained in:
DC* committed 2014-08-08 00:15:44 -03:00
1 parent 2cef41ffb7
commit 7312c1b8bb
13 files changed
+84 -109

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
module.exports = {
up: function(migration, DataTypes, done) {
migration.createTable(
'Tasks',
{
id : {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true},
content : {type: DataTypes.TEXT, allowNull: false},
parent : DataTypes.INTEGER,
isCompleted: DataTypes.BOOLEAN,
createdAt : DataTypes.DATE,
updatedAt : DataTypes.DATE
});
done()
},
down: function(migration, DataTypes, done) {
migration.dropTable('Tasks');
done()
}
}