Fix factory and spec

I merged 175_database_scaffolding and the result of specs became failed.
When we use
```