Migrate to more flexible database initializing