Issue 318. Added schema migration for bugfix