-- 为 rooms 表添加字段
ALTER TABLE rooms ADD COLUMN updateTime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE rooms ADD COLUMN isDeleted INT NOT NULL DEFAULT 0;

-- 为 tenants 表添加字段
ALTER TABLE tenants ADD COLUMN updateTime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE tenants ADD COLUMN isDeleted INT NOT NULL DEFAULT 0;

-- 为 regions 表添加字段
ALTER TABLE regions ADD COLUMN updateTime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE regions ADD COLUMN isDeleted INT NOT NULL DEFAULT 0;

-- 为 apartments 表添加字段
ALTER TABLE apartments ADD COLUMN updateTime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE apartments ADD COLUMN isDeleted INT NOT NULL DEFAULT 0;

-- 为 contracts 表添加字段
ALTER TABLE contracts ADD COLUMN updateTime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE contracts ADD COLUMN isDeleted INT NOT NULL DEFAULT 0;

-- 为 rentals 表添加字段
ALTER TABLE rentals ADD COLUMN updateTime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE rentals ADD COLUMN isDeleted INT NOT NULL DEFAULT 0;

-- 为 water_bills 表添加字段
ALTER TABLE water_bills ADD COLUMN updateTime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE water_bills ADD COLUMN isDeleted INT NOT NULL DEFAULT 0;

-- 为 electricity_bills 表添加字段
ALTER TABLE electricity_bills ADD COLUMN updateTime DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
ALTER TABLE electricity_bills ADD COLUMN isDeleted INT NOT NULL DEFAULT 0;