package com.github.nullptroma.wallenc.infrastructure.android.db

import android.content.Context
import androidx.room.Room
import com.github.nullptroma.wallenc.infrastructure.android.db.app.AppDb

class RoomFactory(private val context: Context) {
    fun buildAppDb(): AppDb {
        val room = Room.databaseBuilder(
            context, AppDb::class.java, "app-db"
        ).fallbackToDestructiveMigration(dropAllTables = true).build()
        return room
    }
}
