Added function migrateTables and fixed some warnings when empty values