Tightened up database table initialization [tracker #1620]