Adding gateTimestamp to unique index. And improving null date enter data