knex/lib/migrate/stub/js.stub

17 lines
344 B
Plaintext
Raw Normal View History

2014-06-18 14:30:24 -07:00
'use strict';
2013-07-30 14:41:25 -04:00
2013-11-25 00:55:26 -05:00
exports.up = function(knex, Promise) {
2013-10-24 21:54:35 -04:00
<% if (d.tableName) { %>
return knex.schema.createTable("<%= d.tableName %>", function(t) {
t.increments();
t.timestamp();
});
2013-10-24 21:54:35 -04:00
<% } %>
2013-07-30 14:41:25 -04:00
};
2013-11-25 00:55:26 -05:00
exports.down = function(knex, Promise) {
2013-10-24 21:54:35 -04:00
<% if (d.tableName) { %>
return knex.schema.dropTable("<%= d.tableName %>");
2013-10-24 21:54:35 -04:00
<% } %>
2013-07-30 14:41:25 -04:00
};