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
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
release-app fix migration
Louis Beaumont4e67768198e2
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 54976157c..218be8d39 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.14.31"+version = "0.14.32"description = ""authors = ["you"]license = ""diff --git a/screenpipe-server/src/db.rs b/screenpipe-server/src/db.rsindex 342622d1f..a728dd03a 100644--- a/screenpipe-server/src/db.rs+++ b/screenpipe-server/src/db.rs@@ -89,17 +89,11 @@ impl DatabaseManager {}async fn run_migrations(pool: &SqlitePool) -> Result<(), sqlx::Error> {- match sqlx::migrate!("./src/migrations").run(pool).await {+ let mut migrator = sqlx::migrate!("./src/migrations");+ migrator.set_ignore_missing(true);+ match migrator.run(pool).await {Ok(_) => Ok(()),- Err(e) => {- // Check if it's a version mismatch for our specific migration- if e.to_string().contains("20241110041538") {- debug!("ignoring known migration mismatch for 20241110041538");- Ok(())- } else {- Err(e.into())- }- }+ Err(e) => Err(e.into()),}}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.sqldeleted file mode 100644index d806a5a09..000000000--- a/screenpipe-server/src/migrations/20241110041538_add_speaker_id_to_transcription.sql+++ /dev/null@@ -1,9 +0,0 @@--- 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 filediff --git a/screenpipe-server/src/migrations/20241126220600_ensure_speaker_id_column.sql b/screenpipe-server/src/migrations/20241126220600_ensure_speaker_id_column.sqldeleted file mode 100644index f2784967e..000000000--- a/screenpipe-server/src/migrations/20241126220600_ensure_speaker_id_column.sql+++ /dev/null@@ -1,28 +0,0 @@--- Check if the column exists and add it if it doesn't-SELECT CASE- WHEN NOT EXISTS (- SELECT 1- FROM pragma_table_info('audio_transcriptions')- WHERE name = 'speaker_id'- )- THEN- 'ALTER TABLE audio_transcriptions ADD COLUMN speaker_id INTEGER REFERENCES speakers(id);'- ELSE- 'SELECT 1;'-END as migration_sql;---- Execute the generated SQL-WITH migration AS (- SELECT CASE- WHEN NOT EXISTS (- SELECT 1- FROM pragma_table_info('audio_transcriptions')- WHERE name = 'speaker_id'- )- THEN- 'ALTER TABLE audio_transcriptions ADD COLUMN speaker_id INTEGER REFERENCES speakers(id);'- ELSE- 'SELECT 1;'- END as sql_to_execute-)-SELECT sql_to_execute FROM migration;diff --git a/screenpipe-server/src/migrations/20241127172038_create_speaker_id_col_final.sql b/screenpipe-server/src/migrations/20241127172038_create_speaker_id_col_final.sqlnew file mode 100644index 000000000..b5024224f--- /dev/null+++ b/screenpipe-server/src/migrations/20241127172038_create_speaker_id_col_final.sql@@ -0,0 +1,11 @@+CREATE TABLE IF NOT EXISTS audio_transcriptions_new AS+SELECT *, NULL as speaker_id+FROM audio_transcriptions+WHERE 0;++INSERT INTO audio_transcriptions_new+SELECT *, NULL as speaker_id+FROM audio_transcriptions;++DROP TABLE audio_transcriptions;+ALTER TABLE audio_transcriptions_new RENAME TO audio_transcriptions;\ No newline at end of filediff --git a/screenpipe-server/src/migrations/20241127220428_add_hallucination_column.sql b/screenpipe-server/src/migrations/20241127220428_add_hallucination_column.sqlnew file mode 100644index 000000000..94f90628d--- /dev/null+++ b/screenpipe-server/src/migrations/20241127220428_add_hallucination_column.sql@@ -0,0 +1 @@+ALTER TABLE speakers ADD COLUMN hallucination BOOLEAN DEFAULT FALSE;\ No newline at end of file