add db init based on active record