不要怂,就是干,撸起袖子干!

Commit fc1f42ab by sdepold

some things for migrations

1 parent 9f7f6027
module.exports = { module.exports = {
up: function(migrator) { up: function(Interface, DataTypes) {
//console.log(migrator.createTable) Interface.createTable('Person', {
name: DataTypes.STRING
})
}, },
down: function(migrator) { down: function(migrator) {
Interface.dropTable('Person')
} }
} }
...@@ -8,7 +8,11 @@ describe('Migrator', function() { ...@@ -8,7 +8,11 @@ describe('Migrator', function() {
describe('getLastMigrationId', function() { describe('getLastMigrationId', function() {
it("should correctly transform array into IN", function() { it("should correctly transform array into IN", function() {
Helpers.async(function(done) { Helpers.async(function(done) {
new Migrator(sequelize, { path: __dirname + '/assets/migrations'}).migrate().success(function() { new Migrator(sequelize, {
path: __dirname + '/assets/migrations',
from: 20111117063700,
to: 20111117063700
}).migrate().success(function() {
done() done()
}) })
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!