Files
starr-philproperties/database/migrations/20260101000020-create-tier-plans.js
T
kennethobsequio 439bb33f77 ready to test
Testing

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
2026-06-22 10:06:58 +08:00

23 lines
993 B
JavaScript

'use strict';
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable('tier_plans', {
plan_id: { type: Sequelize.BIGINT, primaryKey: true, autoIncrement: true },
tier: { type: Sequelize.ENUM('premium', 'exclusive'), allowNull: false },
label: { type: Sequelize.STRING(100), allowNull: false },
duration_days: { type: Sequelize.INTEGER, allowNull: false },
price: { type: Sequelize.DECIMAL(10, 2), allowNull: false },
currency: { type: Sequelize.CHAR(3), allowNull: false, defaultValue: 'USD' },
is_active: { type: Sequelize.BOOLEAN, allowNull: false, defaultValue: true },
createdAt: { type: Sequelize.DATE, allowNull: false },
updatedAt: { type: Sequelize.DATE, allowNull: false },
deletedAt: { type: Sequelize.DATE, allowNull: true },
});
},
async down(queryInterface) {
await queryInterface.dropTable('tier_plans');
},
};