All checks were successful
Deploy to production / deploy (push) Successful in 2m52s
- Updated the tax calculation logic in FalukantService to include character-based checks for political offices, improving accuracy in tax assessments. - Enhanced the MessagesDialog component to incorporate additional parameters such as satisfaction, threshold_percent, director_id, and director_character_id, providing more detailed notifications. - Added new localization entries for director resignation risk notifications in multiple languages, ensuring users receive clear and contextual information regarding director dynamics.
55 lines
1.6 KiB
JavaScript
55 lines
1.6 KiB
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
async up(queryInterface, Sequelize) {
|
|
await queryInterface.sequelize.query(`
|
|
ALTER TABLE falukant_data.relationship_state
|
|
ADD COLUMN IF NOT EXISTS marriage_satisfaction integer;
|
|
`);
|
|
|
|
await queryInterface.sequelize.query(`
|
|
UPDATE falukant_data.relationship_state
|
|
SET marriage_satisfaction = 55
|
|
WHERE marriage_satisfaction IS NULL;
|
|
`);
|
|
|
|
await queryInterface.sequelize.query(`
|
|
ALTER TABLE falukant_data.relationship_state
|
|
ALTER COLUMN marriage_satisfaction SET DEFAULT 55;
|
|
`);
|
|
|
|
await queryInterface.sequelize.query(`
|
|
ALTER TABLE falukant_data.relationship_state
|
|
ALTER COLUMN marriage_satisfaction SET NOT NULL;
|
|
`);
|
|
|
|
await queryInterface.sequelize.query(`
|
|
DO $$
|
|
BEGIN
|
|
IF NOT EXISTS (
|
|
SELECT 1
|
|
FROM pg_constraint
|
|
WHERE conname = 'relationship_state_marriage_satisfaction_check'
|
|
AND connamespace = 'falukant_data'::regnamespace
|
|
) THEN
|
|
ALTER TABLE falukant_data.relationship_state
|
|
ADD CONSTRAINT relationship_state_marriage_satisfaction_check
|
|
CHECK (marriage_satisfaction >= 0 AND marriage_satisfaction <= 100);
|
|
END IF;
|
|
END $$;
|
|
`);
|
|
},
|
|
|
|
async down(queryInterface, Sequelize) {
|
|
await queryInterface.sequelize.query(`
|
|
ALTER TABLE falukant_data.relationship_state
|
|
DROP CONSTRAINT IF EXISTS relationship_state_marriage_satisfaction_check;
|
|
`);
|
|
|
|
await queryInterface.sequelize.query(`
|
|
ALTER TABLE falukant_data.relationship_state
|
|
DROP COLUMN IF EXISTS marriage_satisfaction;
|
|
`);
|
|
}
|
|
};
|