feat(politics): add new political office benefits and enhance database migration
All checks were successful
Deploy to production / deploy (push) Successful in 2m54s
All checks were successful
Deploy to production / deploy (push) Successful in 2m54s
- Introduced new benefits including 'reputation_periodic', 'appoint_politicians', 'set_regional_tax', 'free_lover_slots', 'guard_protection', and 'court_immunity' to the political office system. - Updated database migration to add and remove the 'last_political_daily_salary_on' column using SQL queries for better performance. - Enhanced localization files for multiple languages to support new benefits, improving user experience across the application. - Updated UI components to display new benefits correctly in the PoliticsView, ensuring accurate representation of political office functionalities.
This commit is contained in:
@@ -2,17 +2,10 @@
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.addColumn(
|
||||
{
|
||||
tableName: 'falukant_user',
|
||||
schema: 'falukant_data'
|
||||
},
|
||||
'last_political_daily_salary_on',
|
||||
{
|
||||
type: Sequelize.DATEONLY,
|
||||
allowNull: true
|
||||
}
|
||||
);
|
||||
await queryInterface.sequelize.query(`
|
||||
ALTER TABLE falukant_data.falukant_user
|
||||
ADD COLUMN IF NOT EXISTS last_political_daily_salary_on date NULL;
|
||||
`);
|
||||
|
||||
await queryInterface.sequelize.query(`
|
||||
DO $$
|
||||
@@ -51,13 +44,10 @@ module.exports = {
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.removeColumn(
|
||||
{
|
||||
tableName: 'falukant_user',
|
||||
schema: 'falukant_data'
|
||||
},
|
||||
'last_political_daily_salary_on'
|
||||
);
|
||||
await queryInterface.sequelize.query(`
|
||||
ALTER TABLE falukant_data.falukant_user
|
||||
DROP COLUMN IF EXISTS last_political_daily_salary_on;
|
||||
`);
|
||||
|
||||
await queryInterface.sequelize.query(`
|
||||
DO $$
|
||||
|
||||
Reference in New Issue
Block a user