Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ android {
}
}

// Room 스키마를 파일로 남겨 마이그레이션 검증에 씁니다
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}

dependencies {
implementation(projects.domain)
implementation(projects.common)
Expand Down
241 changes: 241 additions & 0 deletions data/schemas/com.project200.data.local.UndabangDatabase/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "a1f028ec29bd0b4dee3f66b17c0b1740",
"entities": [
{
"tableName": "exercise_count",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`memberId` TEXT NOT NULL, `date` TEXT NOT NULL, `count` INTEGER NOT NULL, PRIMARY KEY(`memberId`, `date`))",
"fields": [
{
"fieldPath": "memberId",
"columnName": "memberId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "date",
"columnName": "date",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "count",
"columnName": "count",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"memberId",
"date"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "exercise_list_item",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`memberId` TEXT NOT NULL, `localId` TEXT NOT NULL, `serverId` INTEGER, `syncState` TEXT NOT NULL, `date` TEXT NOT NULL, `sortOrder` INTEGER NOT NULL, `title` TEXT NOT NULL, `personalType` TEXT NOT NULL, `startedAt` TEXT NOT NULL, `endedAt` TEXT NOT NULL, `thumbnailUrls` TEXT, PRIMARY KEY(`memberId`, `localId`))",
"fields": [
{
"fieldPath": "memberId",
"columnName": "memberId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "localId",
"columnName": "localId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "serverId",
"columnName": "serverId",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "syncState",
"columnName": "syncState",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "date",
"columnName": "date",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "sortOrder",
"columnName": "sortOrder",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "title",
"columnName": "title",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "personalType",
"columnName": "personalType",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "startedAt",
"columnName": "startedAt",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "endedAt",
"columnName": "endedAt",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "thumbnailUrls",
"columnName": "thumbnailUrls",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"memberId",
"localId"
]
},
"indices": [
{
"name": "index_exercise_list_item_memberId_date",
"unique": false,
"columnNames": [
"memberId",
"date"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_exercise_list_item_memberId_date` ON `${TABLE_NAME}` (`memberId`, `date`)"
},
{
"name": "index_exercise_list_item_memberId_serverId",
"unique": false,
"columnNames": [
"memberId",
"serverId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_exercise_list_item_memberId_serverId` ON `${TABLE_NAME}` (`memberId`, `serverId`)"
}
],
"foreignKeys": []
},
{
"tableName": "exercise_record_detail",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`memberId` TEXT NOT NULL, `localId` TEXT NOT NULL, `serverId` INTEGER, `syncState` TEXT NOT NULL, `title` TEXT NOT NULL, `detail` TEXT NOT NULL, `personalType` TEXT NOT NULL, `startedAt` TEXT NOT NULL, `endedAt` TEXT NOT NULL, `location` TEXT NOT NULL, `pictures` TEXT, PRIMARY KEY(`memberId`, `localId`))",
"fields": [
{
"fieldPath": "memberId",
"columnName": "memberId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "localId",
"columnName": "localId",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "serverId",
"columnName": "serverId",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "syncState",
"columnName": "syncState",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "title",
"columnName": "title",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "detail",
"columnName": "detail",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "personalType",
"columnName": "personalType",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "startedAt",
"columnName": "startedAt",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "endedAt",
"columnName": "endedAt",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "location",
"columnName": "location",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "pictures",
"columnName": "pictures",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"memberId",
"localId"
]
},
"indices": [
{
"name": "index_exercise_record_detail_memberId_serverId",
"unique": false,
"columnNames": [
"memberId",
"serverId"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_exercise_record_detail_memberId_serverId` ON `${TABLE_NAME}` (`memberId`, `serverId`)"
}
],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a1f028ec29bd0b4dee3f66b17c0b1740')"
]
}
}
Loading
Loading