From 1662608835099ee3176d07d67c6a3c69f716f938 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 30 Mar 2025 17:05:51 -0400 Subject: Fixed issues; Generate bot invite; Added database migrations --- .../db/migrations/20250330202144-command-usages.js | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 bot/src/db/migrations/20250330202144-command-usages.js (limited to 'bot/src/db/migrations/20250330202144-command-usages.js') diff --git a/bot/src/db/migrations/20250330202144-command-usages.js b/bot/src/db/migrations/20250330202144-command-usages.js new file mode 100644 index 0000000..095f817 --- /dev/null +++ b/bot/src/db/migrations/20250330202144-command-usages.js @@ -0,0 +1,31 @@ +'use strict'; + +/** @type {import('sequelize-cli').Migration} */ +export const up = async (queryInterface, Sequelize) => { + return await queryInterface.createTable('command-usages', { + id: { + type: Sequelize.INTEGER, + autoIncrement: true, + primaryKey: true + }, + command: { + type: Sequelize.STRING, + allowNull: false + }, + userID: { + type: Sequelize.STRING, + allowNull: false + }, + guildID: { + type: Sequelize.STRING, + allowNull: true + }, + createdAt: { + type: Sequelize.DATE + } + }); +}; + +export const down = async (queryInterface) => { + return await queryInterface.dropTable('command-usages'); +}; -- cgit v1.2.3