diff options
Diffstat (limited to 'bot/src/db/migrations/20250330202144-command-usages.js')
| -rw-r--r-- | bot/src/db/migrations/20250330202144-command-usages.js | 31 |
1 files changed, 31 insertions, 0 deletions
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'); +}; |
