1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-24 23:59:48 +02:00

ref: Little refactoring

This commit is contained in:
Maksim Eltyshev 2023-01-08 22:10:41 +01:00
parent 6021d67a00
commit b58b91baa1
8 changed files with 14 additions and 17 deletions

View file

@ -63,11 +63,9 @@ module.exports.down = async (knex) => {
.where('id', attachment.id);
}
await knex.schema.table('attachment', (table) => {
return knex.schema.table('attachment', (table) => {
table.dropColumn('image');
});
return knex.schema.alterTable('attachment', (table) => {
table.boolean('is_image').notNullable().alter();
table.dropNullable('is_image');
});
};

View file

@ -3,8 +3,8 @@ module.exports.up = async (knex) => {
table.dropColumn('type');
});
return knex.schema.alterTable('card', (table) => {
table.bigInteger('list_id').notNullable().alter();
return knex.schema.table('card', (table) => {
table.dropNullable('list_id');
});
};
@ -12,10 +12,10 @@ module.exports.down = async (knex) => {
await knex.schema.table('board', (table) => {
/* Columns */
table.text('type').notNullable().defaultTo('kanban');
table.text('type').notNullable().defaultTo('kanban'); // FIXME: drop default
});
return knex.schema.alterTable('card', (table) => {
table.bigInteger('list_id').alter();
return knex.schema.table('card', (table) => {
table.setNullable('list_id');
});
};

View file

@ -100,7 +100,6 @@ const processAttachmentImage = async (attachment, attachmentsPath) => {
module.exports.up = async (knex) => {
const config = await getConfig();
const users = await knex('user_account').whereNotNull('avatar');
// eslint-disable-next-line no-restricted-syntax