mirror of
https://github.com/knex/knex.git
synced 2025-12-28 07:29:16 +00:00
added knex migration template for LiveScript
This commit is contained in:
parent
e508f10772
commit
0619663d1a
14
lib/stub/ls.stub
Normal file
14
lib/stub/ls.stub
Normal 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 %>"
|
||||
<% } %>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user