[PATCH 4/5] sms: Add code to migrate the database to the new schema