kutt/server/migrations/20200730203154_expire_in.js
2024-08-11 18:41:03 +03:30

18 lines
300 B
JavaScript

async function up(knex) {
const hasExpireIn = await knex.schema.hasColumn("links", "expire_in");
if (!hasExpireIn) {
await knex.schema.alterTable("links", table => {
table.dateTime("expire_in");
});
}
}
async function down() {
return null;
}
module.exports = {
up,
down
}