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
9 changes: 9 additions & 0 deletions native/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,20 @@ android {
jvmTarget = "17"
}

sourceSets {
getByName("androidTest").assets.srcDirs("$projectDir/schemas")
getByName("test").assets.srcDirs("$projectDir/schemas")
}

buildFeatures {
compose = true
}
}

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}

detekt {
// Analyse statique du code Kotlin. La config de base est enrichie par les
// réglages adaptés à Compose dans config/detekt/detekt.yml.
Expand Down
174 changes: 174 additions & 0 deletions native/app/schemas/com.localstream.app.data.db.AppDatabase/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "a1b2c3d4e5f67890123456789abcdef0",
"entities": [
{
"tableName": "watched_items",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `watched` INTEGER NOT NULL, `watched_at` INTEGER NOT NULL, `media_store_id` INTEGER, PRIMARY KEY(`name`))",
"fields": [
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "watched",
"columnName": "watched",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "watchedAt",
"columnName": "watched_at",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "mediaStoreId",
"columnName": "media_store_id",
"affinity": "INTEGER"
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"name"
]
}
},
{
"tableName": "playback_state",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `progress_pct` REAL NOT NULL, `position_ms` INTEGER NOT NULL, `last_played_at` INTEGER NOT NULL, `media_store_id` INTEGER, PRIMARY KEY(`name`))",
"fields": [
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "progressPct",
"columnName": "progress_pct",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "positionMs",
"columnName": "position_ms",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastPlayedAt",
"columnName": "last_played_at",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "mediaStoreId",
"columnName": "media_store_id",
"affinity": "INTEGER"
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"name"
]
}
},
{
"tableName": "playlist",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `created_at` INTEGER NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "createdAt",
"columnName": "created_at",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
}
},
{
"tableName": "playlist_item",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlist_id` TEXT NOT NULL, `video_name` TEXT NOT NULL, `position` INTEGER NOT NULL, PRIMARY KEY(`playlist_id`, `video_name`), FOREIGN KEY(`playlist_id`) REFERENCES `playlist`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "playlistId",
"columnName": "playlist_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "videoName",
"columnName": "video_name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "position",
"columnName": "position",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"playlist_id",
"video_name"
]
},
"indices": [
{
"name": "index_playlist_item_playlist_id",
"unique": false,
"columnNames": [
"playlist_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_playlist_item_playlist_id` ON `${TABLE_NAME}` (`playlist_id`)"
}
],
"foreignKeys": [
{
"table": "playlist",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"playlist_id"
],
"referencedColumns": [
"id"
]
}
]
}
],
"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, 'a1b2c3d4e5f67890123456789abcdef0')"
]
}
}
Loading
Loading