Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- CollapsingToolbarLayout
- lifecycle
- BOJ
- activity
- Android
- kotlin
- onLayout
- LiveData
- CoordinatorLayout
- HTTP
- room
- Behavior
- 안드로이드
- 알림
- 코틀린
- 백준
- View
- onMeasure
- AppBarLayout
- 알고리즘
- ViewModel
- Algorithm
- DataBinding
- sqlite
- Navigation
- hilt
- notification
- CustomView
- recyclerview
- Coroutine
Archives
- Today
- Total
목록데이터 베이스 (1)
개발일지

Migration Room에서 Scheme가 업데이트 된 경우 처리를 해줘야 하는데 이를 Migration이라고 한다. Scheme에 변화가 생기면 직접 SQL문을 작성해서 처리해야 하고 데이터베이스의 버전을 수정해야 미리 다운로드된 기기에서 앱 업데이트시 정상 작동할 수 있다. AppDatabase Migration을 상속받아 migrate를 override한 후 addMigrations로 Migrate한다. @Database(entities = [Drawer::class, ToDo::class], version = 2, exportSchema = true) abstract class AppDatabase : RoomDatabase() { companion object { private var inst..
Android (안드로이드)/Room
2021. 1. 17. 02:42