added knex migration template for LiveScript

This commit is contained in:
John BEPPU 2014-02-13 09:54:37 -08:00
parent e508f10772
commit 0619663d1a

14
lib/stub/ls.stub Normal file
View File

@ -0,0 +1,14 @@
exports.up = (knex, Promise) ->
<% if (d.tableName) { %>
knex.schema.create-table "<%= d.tableName %>", (t) ->
t.increments!
t.timestamp!
<% } %>
exports.down = (knex, Promise) ->
<% if (d.tableName) { %>
knex.schema.drop-table "<%= d.tableName %>"
<% } %>