fix: remove the unique constraint for patch bundle names

This commit is contained in:
Ax333l 2024-08-12 22:42:51 +02:00
parent e869db0555
commit e992a99783
No known key found for this signature in database
GPG key ID: D2B4D85271127D23
2 changed files with 5 additions and 15 deletions

View file

@ -2,7 +2,7 @@
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "c0c780e55e10c9b095c004733c846b67",
"identityHash": "1dd9d5c0201fdf3cfef3ae669fd65e46",
"entities": [
{
"tableName": "patch_bundles",
@ -51,17 +51,7 @@
"uid"
]
},
"indices": [
{
"name": "index_patch_bundles_name",
"unique": true,
"columnNames": [
"name"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_patch_bundles_name` ON `${TABLE_NAME}` (`name`)"
}
],
"indices": [],
"foreignKeys": []
},
{
@ -407,7 +397,7 @@
"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, 'c0c780e55e10c9b095c004733c846b67')"
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '1dd9d5c0201fdf3cfef3ae669fd65e46')"
]
}
}

View file

@ -21,7 +21,7 @@ sealed class Source {
}
companion object {
fun from(value: String) = when(value) {
fun from(value: String) = when (value) {
Local.SENTINEL -> Local
API.SENTINEL -> API
else -> Remote(Url(value))
@ -34,7 +34,7 @@ data class VersionInfo(
@ColumnInfo(name = "integrations_version") val integrations: String? = null,
)
@Entity(tableName = "patch_bundles", indices = [Index(value = ["name"], unique = true)])
@Entity(tableName = "patch_bundles")
data class PatchBundleEntity(
@PrimaryKey val uid: Int,
@ColumnInfo(name = "name") val name: String,