Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: broken migration

Louis Beaumont71a5e177e907
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index 7a83cc4c3..b122f3cc9 100644
--- a/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "0.13.3"
+version = "0.13.4"
description = ""
authors = ["you"]
license = ""
diff --git a/screenpipe-server/src/migrations/20241110041538_add_speaker_id_to_transcription.sql b/screenpipe-server/src/migrations/20241110041538_add_speaker_id_to_transcription.sql
index 71d760fa0..d806a5a09 100644
--- a/screenpipe-server/src/migrations/20241110041538_add_speaker_id_to_transcription.sql
+++ b/screenpipe-server/src/migrations/20241110041538_add_speaker_id_to_transcription.sql
@@ -1,2 +1,9 @@
-ALTER TABLE audio_transcriptions
-ADD COLUMN speaker_id INTEGER REFERENCES speakers(id);
\ No newline at end of file
+-- First check if the column exists
+SELECT CASE
+ WHEN COUNT(*) = 0 THEN
+ 'ALTER TABLE audio_transcriptions ADD COLUMN speaker_id INTEGER REFERENCES speakers(id);'
+ ELSE
+ 'SELECT 1;'
+END as sql_to_execute
+FROM pragma_table_info('audio_transcriptions')
+WHERE name = 'speaker_id';
\ No newline at end of file