@kaeawc/auto-mobile 0.0.48 → 0.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,9 +8,9 @@
8
8
  ![Platform: macOS](https://img.shields.io/badge/platform-macOS-lightgrey)
9
9
  ![Platform: Linux](https://img.shields.io/badge/platform-Linux-lightgrey)
10
10
 
11
- ![TypeScript tests: 10,175](https://img.shields.io/badge/TypeScript_tests-10%2C175-3178C6)
12
- ![Kotlin tests: 2,409](https://img.shields.io/badge/Kotlin_tests-2%2C409-7F52FF)
13
- ![Swift tests: 879](https://img.shields.io/badge/Swift_tests-879-F05138)
11
+ ![TypeScript tests: 10,381](https://img.shields.io/badge/TypeScript_tests-10%2C381-3178C6)
12
+ ![Kotlin tests: 2,433](https://img.shields.io/badge/Kotlin_tests-2%2C433-7F52FF)
13
+ ![Swift tests: 963](https://img.shields.io/badge/Swift_tests-963-F05138)
14
14
  ![Kotlin coverage](https://img.shields.io/endpoint?url=https://kaeawc.github.io/auto-mobile/kotlin-coverage-badge.json)
15
15
  ![Swift coverage](https://img.shields.io/endpoint?url=https://kaeawc.github.io/auto-mobile/swift-coverage-badge.json)
16
16
 
package/README.md.backup CHANGED
@@ -8,9 +8,9 @@
8
8
  ![Platform: macOS](https://img.shields.io/badge/platform-macOS-lightgrey)
9
9
  ![Platform: Linux](https://img.shields.io/badge/platform-Linux-lightgrey)
10
10
 
11
- ![TypeScript tests: 10,175](https://img.shields.io/badge/TypeScript_tests-10%2C175-3178C6)
12
- ![Kotlin tests: 2,409](https://img.shields.io/badge/Kotlin_tests-2%2C409-7F52FF)
13
- ![Swift tests: 879](https://img.shields.io/badge/Swift_tests-879-F05138)
11
+ ![TypeScript tests: 10,381](https://img.shields.io/badge/TypeScript_tests-10%2C381-3178C6)
12
+ ![Kotlin tests: 2,433](https://img.shields.io/badge/Kotlin_tests-2%2C433-7F52FF)
13
+ ![Swift tests: 963](https://img.shields.io/badge/Swift_tests-963-F05138)
14
14
  ![Kotlin coverage](https://img.shields.io/endpoint?url=https://kaeawc.github.io/auto-mobile/kotlin-coverage-badge.json)
15
15
  ![Swift coverage](https://img.shields.io/endpoint?url=https://kaeawc.github.io/auto-mobile/swift-coverage-badge.json)
16
16
 
@@ -1,4 +1,4 @@
1
- import type { Kysely } from "kysely";
1
+ import { sql, type Kysely } from "kysely";
2
2
 
3
3
  /**
4
4
  * Session-scope the video recording archive (issue #4752).
@@ -12,10 +12,17 @@ import type { Kysely } from "kysely";
12
12
  * existing archive.
13
13
  */
14
14
  export async function up(db: Kysely<unknown>): Promise<void> {
15
- await db.schema
16
- .alterTable("video_recordings")
17
- .addColumn("owner_session_uuid", "text")
18
- .execute();
15
+ const existingColumn = await sql<{ name: string }>`
16
+ SELECT name FROM pragma_table_info('video_recordings')
17
+ WHERE name = 'owner_session_uuid'
18
+ `.execute(db);
19
+
20
+ if (existingColumn.rows.length === 0) {
21
+ await db.schema
22
+ .alterTable("video_recordings")
23
+ .addColumn("owner_session_uuid", "text")
24
+ .execute();
25
+ }
19
26
 
20
27
  await db.schema
21
28
  .createIndex("idx_video_recordings_owner_session")