/*
  Warnings:

  - You are about to alter the column `is_active` on the `users` table. The data in that column could be lost. The data in that column will be cast from `Enum(EnumId(15))` to `TinyInt`.
  - Added the required column `password_hash` to the `society_registration_requests` table without a default value. This is not possible if the table is not empty.

*/
-- AlterTable
ALTER TABLE `maintenance_payments` ADD COLUMN `months_count` INTEGER NOT NULL DEFAULT 1;

-- AlterTable
ALTER TABLE `society` ADD COLUMN `maintenance_frequency` ENUM('monthly', 'quarterly', 'yearly') NOT NULL DEFAULT 'monthly';

-- AlterTable
ALTER TABLE `society_registration_requests` ADD COLUMN `id_proof_url` VARCHAR(255) NULL,
    ADD COLUMN `maintenance_frequency` ENUM('monthly', 'quarterly', 'yearly') NULL DEFAULT 'monthly',
    ADD COLUMN `monthly_maintenance` DECIMAL(10, 2) NULL,
    ADD COLUMN `password_hash` VARCHAR(255) NOT NULL;

-- AlterTable
ALTER TABLE `users` ADD COLUMN `status` BOOLEAN NOT NULL DEFAULT true,
    ADD COLUMN `wing` VARCHAR(10) NOT NULL DEFAULT '',
    MODIFY `is_active` BOOLEAN NOT NULL DEFAULT true,
    MODIFY `ownership` ENUM('owner', 'tenant') NOT NULL DEFAULT 'owner';
