mirror of
https://github.com/knex/knex.git
synced 2025-07-03 15:10:07 +00:00
23 lines
465 B
Plaintext
23 lines
465 B
Plaintext
/**
|
|
* @param { import("knex").Knex } knex
|
|
* @returns { Promise<void> }
|
|
*/
|
|
exports.up = function(knex) {
|
|
<% if (d.tableName) { %>
|
|
return knex.schema.createTable("<%= d.tableName %>", function(t) {
|
|
t.increments();
|
|
t.timestamp();
|
|
});
|
|
<% } %>
|
|
};
|
|
|
|
/**
|
|
* @param { import("knex").Knex } knex
|
|
* @returns { Promise<void> }
|
|
*/
|
|
exports.down = function(knex) {
|
|
<% if (d.tableName) { %>
|
|
return knex.schema.dropTable("<%= d.tableName %>");
|
|
<% } %>
|
|
};
|