CREATE TABLE SecondMonthlyBill
(
    id BIGINT DEFAULT NULL,
    Year CHAR(4) NOT NULL,
    Month CHAR(2) NOT NULL,
    Customer BIGINT UNSIGNED NOT NULL,
    Template BIGINT UNSIGNED NOT NULL,
    MonthlyBill BIGINT UNSIGNED DEFAULT NULL,
    NoServices TINYINT DEFAULT 0,
    LockId CHAR(32) DEFAULT NULL,
    PRIMARY KEY ( id ) AUTO_INCREMENT,
    UNIQUE KEY ( Year,Month,Customer ),
    KEY ( LockId )

) ENGINE=INNODB CHARSET=UTF8;
