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
1 change: 1 addition & 0 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ dependencies {
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0")
testImplementation("com.google.truth:truth:1.4.4")
testImplementation("org.json:json:20240303")
testImplementation("org.xerial:sqlite-jdbc:3.45.1.0")

// Instrumented tests (Room migration)
androidTestImplementation("androidx.test.ext:junit:1.2.1")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"formatVersion": 1,
"database": {
"version": 2,
"identityHash": "d4abfbbd22cc59fc3cf354366d60a1a7",
"entities": [
{
"tableName": "profiles",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `debugTiming` INTEGER NOT NULL, `socksHost` TEXT NOT NULL, `socksPort` INTEGER NOT NULL, `googleHost` TEXT NOT NULL, `sniJson` TEXT NOT NULL, `scriptKeysText` TEXT NOT NULL, `tunnelKey` TEXT NOT NULL, `isSelected` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "debugTiming",
"columnName": "debugTiming",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "socksHost",
"columnName": "socksHost",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "socksPort",
"columnName": "socksPort",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "googleHost",
"columnName": "googleHost",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "sniJson",
"columnName": "sniJson",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "scriptKeysText",
"columnName": "scriptKeysText",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "tunnelKey",
"columnName": "tunnelKey",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isSelected",
"columnName": "isSelected",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "createdAt",
"columnName": "createdAt",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"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, 'd4abfbbd22cc59fc3cf354366d60a1a7')"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"formatVersion": 1,
"database": {
"version": 3,
"identityHash": "7cf2680a4a5066b2e91da28c08c7e4d0",
"entities": [
{
"tableName": "profiles",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `debugTiming` INTEGER NOT NULL, `socksHost` TEXT NOT NULL, `socksPort` INTEGER NOT NULL, `socksUser` TEXT NOT NULL, `socksPass` TEXT NOT NULL, `googleHost` TEXT NOT NULL, `sniJson` TEXT NOT NULL, `scriptKeysText` TEXT NOT NULL, `tunnelKey` TEXT NOT NULL, `coalesceStepMs` INTEGER NOT NULL, `idleSlotsPerBucket` INTEGER NOT NULL, `isSelected` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "debugTiming",
"columnName": "debugTiming",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "socksHost",
"columnName": "socksHost",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "socksPort",
"columnName": "socksPort",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "socksUser",
"columnName": "socksUser",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "socksPass",
"columnName": "socksPass",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "googleHost",
"columnName": "googleHost",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "sniJson",
"columnName": "sniJson",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "scriptKeysText",
"columnName": "scriptKeysText",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "tunnelKey",
"columnName": "tunnelKey",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "coalesceStepMs",
"columnName": "coalesceStepMs",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "idleSlotsPerBucket",
"columnName": "idleSlotsPerBucket",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isSelected",
"columnName": "isSelected",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "createdAt",
"columnName": "createdAt",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"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, '7cf2680a4a5066b2e91da28c08c7e4d0')"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"formatVersion": 1,
"database": {
"version": 4,
"identityHash": "21577208642f1e1ac37aa9674fd36d98",
"entities": [
{
"tableName": "profiles",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `debugTiming` INTEGER NOT NULL, `socksHost` TEXT NOT NULL, `socksPort` INTEGER NOT NULL, `socksUser` TEXT NOT NULL, `socksPass` TEXT NOT NULL, `googleHost` TEXT NOT NULL, `sniJson` TEXT NOT NULL, `scriptKeysText` TEXT NOT NULL, `tunnelKey` TEXT NOT NULL, `coalesceStepMs` INTEGER NOT NULL, `idleSlotsPerBucket` INTEGER NOT NULL, `remoteUrl` TEXT, `isSelected` INTEGER NOT NULL, `createdAt` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "debugTiming",
"columnName": "debugTiming",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "socksHost",
"columnName": "socksHost",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "socksPort",
"columnName": "socksPort",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "socksUser",
"columnName": "socksUser",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "socksPass",
"columnName": "socksPass",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "googleHost",
"columnName": "googleHost",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "sniJson",
"columnName": "sniJson",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "scriptKeysText",
"columnName": "scriptKeysText",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "tunnelKey",
"columnName": "tunnelKey",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "coalesceStepMs",
"columnName": "coalesceStepMs",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "idleSlotsPerBucket",
"columnName": "idleSlotsPerBucket",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "remoteUrl",
"columnName": "remoteUrl",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "isSelected",
"columnName": "isSelected",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "createdAt",
"columnName": "createdAt",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [],
"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, '21577208642f1e1ac37aa9674fd36d98')"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase

@Database(entities = [ProfileEntity::class], version = 3, exportSchema = true)
@Database(entities = [ProfileEntity::class], version = 4, exportSchema = true)
abstract class AppDatabase : RoomDatabase() {
abstract fun profileDao(): ProfileDao

Expand Down
Loading
Loading