knex/lib/migrate/stub/coffee.stub

13 lines
279 B
Plaintext
Raw Normal View History

2013-07-30 14:41:25 -04:00
2013-11-25 00:55:26 -05:00
exports.up = (knex, Promise) ->
2013-10-24 21:54:35 -04:00
<% if (d.tableName) { %>
knex.schema.createTable "<%= d.tableName %>", (t) ->
2013-11-26 12:19:27 -05:00
t.increments()
t.timestamp()
<% } %>
2013-07-30 14:41:25 -04:00
2013-11-25 00:55:26 -05:00
exports.down = (knex, Promise) ->
2013-11-26 12:19:27 -05:00
<% if (d.tableName) { %>
2013-10-24 21:54:35 -04:00
knex.schema.dropTable "<%= d.tableName %>"
2013-11-26 12:19:27 -05:00
<% } %>