diff --git a/src-native/migrate.rs b/src-native/migrate.rs index 2553232..2b7d9b3 100644 --- a/src-native/migrate.rs +++ b/src-native/migrate.rs @@ -226,7 +226,7 @@ async fn insert_library_into_db( sqlx::query( " INSERT INTO track_lists - (id, type, name, description, created_at) + (id, kind, name, description, created_at) VALUES (?, ?, ?, ?, ?) ", ) @@ -246,7 +246,7 @@ async fn insert_library_into_db( sqlx::query( " INSERT INTO track_lists - (id, type, parent_id, item_index, name, description, liked, disliked, + (id, kind, parent_id, item_index, name, description, liked, disliked, imported_from, original_id, imported_at, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ", @@ -274,7 +274,7 @@ async fn insert_library_into_db( sqlx::query( " INSERT INTO track_lists - (id, type, parent_id, item_index, name, description, liked, disliked, + (id, kind, parent_id, item_index, name, description, liked, disliked, imported_from, original_id, imported_at, created_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ", diff --git a/src-native/migrations/1_start.sql b/src-native/migrations/1_start.sql index 08e922f..a7814d0 100644 --- a/src-native/migrations/1_start.sql +++ b/src-native/migrations/1_start.sql @@ -73,7 +73,7 @@ CREATE TABLE skips_imported ( CREATE TABLE track_lists ( id TEXT PRIMARY KEY NOT NULL, - type TEXT NOT NULL CHECK (type IN ('playlist', 'folder', 'special')), + kind TEXT NOT NULL CHECK (kind IN ('playlist', 'folder', 'special')), parent_id TEXT NULL REFERENCES track_lists(id), item_index INTEGER NULL, name TEXT NOT NULL,