Guardian-admin-backend/src/migrations/20240601-create-system-stat.js
2025-07-15 19:31:25 +05:30

37 lines
814 B
JavaScript

'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable('system_stats', {
id: {
type: Sequelize.INTEGER,
autoIncrement: true,
primaryKey: true,
allowNull: false,
},
smsSent: {
type: Sequelize.INTEGER,
defaultValue: 0,
},
emailsSent: {
type: Sequelize.INTEGER,
defaultValue: 0,
},
callsMade: {
type: Sequelize.INTEGER,
defaultValue: 0,
},
createdAt: {
allowNull: false,
type: Sequelize.DATE,
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE,
},
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.dropTable('system_stats');
},
};