aboutsummaryrefslogtreecommitdiff
path: root/bot/src/db/migrations/20250330201535-update-guild-settings.js
blob: 1d4a4d3e932f5c3fa424b778ccf40133e282120f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
'use strict';

/** @type {import('sequelize-cli').Migration} */
export const up = async (queryInterface, Sequelize) => {
    await queryInterface.addColumn('guild-settings', 'suggestionsChannelID', {
        type: Sequelize.STRING,
        allowNull: true
    });

    await queryInterface.addColumn('guild-settings', 'qotdChannelID', {
        type: Sequelize.STRING,
        allowNull: true
    });

    await queryInterface.addColumn('guild-settings', 'qotdToggle', {
        type: Sequelize.BOOLEAN,
        allowNull: true
    });

    await queryInterface.addColumn('guild-settings', 'ollamaEnabled', {
        type: Sequelize.BOOLEAN,
        allowNull: true
    });
};

export const down = async (queryInterface) => {
    await queryInterface.removeColumn('guild-settings', 'suggestionsChannelID');
    await queryInterface.removeColumn('guild-settings', 'qotdChannelID');
    await queryInterface.removeColumn('guild-settings', 'qotdToggle');
    await queryInterface.removeColumn('guild-settings', 'ollamaEnabled');
};