Put domain creation into a function.
Put domain creation into a function.

To find relationships all database models have to be defined.
Moved domain creation into a function so all importing happens first.

(Before make_domain is called in init_app)

amiv-eth/amivapi,amiv-eth/amivapi,amiv-eth/amivapi