-import { logger, mkdirpPromise, rimrafPromise } from '../helpers'
-import { createUserAccountAndChannel } from '../lib'
-import { createLocalAccount } from '../lib/user'
-import { clientsExist, usersExist } from './checker'
-import { CACHE, CONFIG, LAST_MIGRATION_VERSION } from './constants'
-
-import { database as db } from './database'
+import { logger } from '../helpers/logger'
+import { createApplicationActor, createUserAccountAndChannelAndPlaylist } from '../lib/user'
+import { UserModel } from '../models/account/user'
+import { ApplicationModel } from '../models/application/application'
+import { OAuthClientModel } from '../models/oauth/oauth-client'
+import { applicationExist, clientsExist, usersExist } from './checker-after-init'
+import { CACHE, CONFIG, HLS_STREAMING_PLAYLIST_DIRECTORY, LAST_MIGRATION_VERSION } from './constants'
+import { sequelizeTypescript } from './database'
+import { remove, ensureDir } from 'fs-extra'