knex/lib/stub/js.stub

16 lines
330 B
Plaintext
Raw Normal View History

2013-07-30 14:41:25 -04: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
};
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
};