implemented database migrations [closes #24]