Get rid of problematic sql verification

This commit is contained in:
Greg Shuflin 2025-02-03 20:44:20 -08:00
parent 5a0aa72066
commit 739406336b
2 changed files with 1 additions and 10 deletions

View File

@ -9,11 +9,6 @@ BEGIN
WHEN NOT (
json_valid(NEW.categorization)
AND json_type(NEW.categorization) = 'array'
AND (
SELECT COUNT(*)
FROM json_each(NEW.categorization)
WHERE json_type(value) != 'text'
) = 0
)
THEN RAISE(ROLLBACK, 'categorization must be an array of strings')
END;
@ -26,11 +21,6 @@ BEGIN
WHEN NOT (
json_valid(NEW.categorization)
AND json_type(NEW.categorization) = 'array'
AND (
SELECT COUNT(*)
FROM json_each(NEW.categorization)
WHERE json_type(value) != 'text'
) = 0
)
THEN RAISE(ROLLBACK, 'categorization must be an array of strings')
END;

View File

@ -79,6 +79,7 @@ pub async fn setup_demo_data(pool: &sqlx::SqlitePool) {
eprintln!("Failed to serialize categorization: {}", e);
sqlx::Error::Decode(Box::new(e))
}).unwrap();
println!("{}", categorization_json);
sqlx::query(
"INSERT INTO feeds (feed_id, name, url, user_id, added_time, last_checked_time, categorization)