fix sql upgrade and cleanup default shema