2024-08-11 18:41:03 +03:30
|
|
|
async function up(knex) {
|
2020-08-04 20:32:23 +04:30
|
|
|
const hasExpireIn = await knex.schema.hasColumn("links", "expire_in");
|
|
|
|
if (!hasExpireIn) {
|
|
|
|
await knex.schema.alterTable("links", table => {
|
|
|
|
table.dateTime("expire_in");
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-11 18:41:03 +03:30
|
|
|
async function down() {
|
2020-08-04 20:32:23 +04:30
|
|
|
return null;
|
|
|
|
}
|
2024-08-11 18:41:03 +03:30
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
up,
|
|
|
|
down
|
|
|
|
}
|