simplifies attribute migration generation and adds tests