Compare commits
2 Commits
cfc98819ab
...
9cec32ba3e
| Author | SHA1 | Date | |
|---|---|---|---|
| 9cec32ba3e | |||
| e8768dfad7 |
8
Cargo.lock
generated
8
Cargo.lock
generated
@@ -64,7 +64,7 @@ checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "api"
|
name = "api"
|
||||||
version = "1.8.1"
|
version = "1.9.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"argon2",
|
"argon2",
|
||||||
@@ -1232,7 +1232,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexer"
|
name = "indexer"
|
||||||
version = "1.8.1"
|
version = "1.9.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"axum",
|
"axum",
|
||||||
@@ -1771,7 +1771,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parsers"
|
name = "parsers"
|
||||||
version = "1.8.1"
|
version = "1.9.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"flate2",
|
"flate2",
|
||||||
@@ -2906,7 +2906,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "stripstream-core"
|
name = "stripstream-core"
|
||||||
version = "1.8.1"
|
version = "1.9.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ resolver = "2"
|
|||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
version = "1.8.1"
|
version = "1.9.0"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
|
|||||||
@@ -398,7 +398,7 @@ pub async fn list_series(
|
|||||||
} else { String::new() };
|
} else { String::new() };
|
||||||
|
|
||||||
let ss_cond = if query.series_status.is_some() {
|
let ss_cond = if query.series_status.is_some() {
|
||||||
p += 1; format!("AND sm.status = ${p}")
|
p += 1; format!("AND LOWER(sm.status) = ${p}")
|
||||||
} else { String::new() };
|
} else { String::new() };
|
||||||
|
|
||||||
let missing_cond = if has_missing {
|
let missing_cond = if has_missing {
|
||||||
@@ -655,7 +655,7 @@ pub async fn list_all_series(
|
|||||||
} else { String::new() };
|
} else { String::new() };
|
||||||
|
|
||||||
let ss_cond = if query.series_status.is_some() {
|
let ss_cond = if query.series_status.is_some() {
|
||||||
p += 1; format!("AND sm.status = ${p}")
|
p += 1; format!("AND LOWER(sm.status) = ${p}")
|
||||||
} else { String::new() };
|
} else { String::new() };
|
||||||
|
|
||||||
let missing_cond = if has_missing {
|
let missing_cond = if has_missing {
|
||||||
@@ -868,7 +868,7 @@ pub async fn series_statuses(
|
|||||||
) -> Result<Json<Vec<String>>, ApiError> {
|
) -> Result<Json<Vec<String>>, ApiError> {
|
||||||
let rows: Vec<String> = sqlx::query_scalar(
|
let rows: Vec<String> = sqlx::query_scalar(
|
||||||
r#"SELECT DISTINCT s FROM (
|
r#"SELECT DISTINCT s FROM (
|
||||||
SELECT status AS s FROM series_metadata WHERE status IS NOT NULL
|
SELECT LOWER(status) AS s FROM series_metadata WHERE status IS NOT NULL
|
||||||
UNION
|
UNION
|
||||||
SELECT mapped_status AS s FROM status_mappings
|
SELECT mapped_status AS s FROM status_mappings
|
||||||
) t ORDER BY s"#,
|
) t ORDER BY s"#,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "stripstream-backoffice",
|
"name": "stripstream-backoffice",
|
||||||
"version": "1.8.1",
|
"version": "1.9.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 7082",
|
"dev": "next dev -p 7082",
|
||||||
|
|||||||
5
infra/migrations/0040_lowercase_series_status.sql
Normal file
5
infra/migrations/0040_lowercase_series_status.sql
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
-- Normalize all series_metadata.status values to lowercase for consistency.
|
||||||
|
-- This fixes case mismatches like "One shot" vs "one shot".
|
||||||
|
UPDATE series_metadata
|
||||||
|
SET status = LOWER(status), updated_at = NOW()
|
||||||
|
WHERE status IS NOT NULL AND status != LOWER(status);
|
||||||
Reference in New Issue
Block a user