ts.stub 408 B

12345678910111213141516
  1. import * as Knex from "knex";
  2. exports.up = function (knex: Knex): Promise<any> {
  3. <% if (d.tableName) { %>
  4. return knex.schema.createTable("<%= d.tableName %>", function (t) {
  5. t.increments();
  6. t.timestamps();
  7. });
  8. <% } %>
  9. };
  10. exports.down = function (knex: Knex): Promise<any> {
  11. <% if (d.tableName) { %>
  12. return knex.schema.dropTable("<%= d.tableName %>");
  13. <% } %>
  14. };