Files
arr/.sqlx/query-3adb45309bbd3f1de7d968abd8e5a65d4c6a2b890a54af9d5d2d956cca783892.json
T
Miguel Palhas ef4722e1dd fix(db): bump sqlx to 0.9, honour no-transaction
sqlx-sqlite 0.8 ignored Migration.no_tx and wrapped every
migration in a transaction, where PRAGMA foreign_keys = OFF
is a no-op — so any table rebuild cascade-deleted children.
0.9 honours `-- no-transaction`, so 0014 drops its
movie_releases_backup / episode_releases_backup workaround
and runs the plain rebuild recipe with foreign keys off.
A migration test rebuilds both parents from a pre-0014
database and asserts the child link rows survive.

Closes #155

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 18:10:53 +01:00

125 lines
3.4 KiB
JSON

{
"db_name": "SQLite",
"query": "\n SELECT m.id AS \"id!: i64\",\n m.tmdb_id AS \"tmdb_id!: i64\",\n m.title AS \"title!: String\",\n m.year,\n m.wanted AS \"wanted!: bool\",\n m.root_id AS \"root_id!: i64\",\n r.path AS \"root_path!: String\",\n m.created_at AS \"created_at!: String\",\n (SELECT count(*) FROM media_files f\n WHERE f.owner_kind = 'movie' AND f.owner_id = m.id)\n AS \"file_count!: i64\",\n (SELECT coalesce(sum(f.size), 0) FROM media_files f\n WHERE f.owner_kind = 'movie' AND f.owner_id = m.id)\n AS \"size_on_disk!: i64\"\n FROM movies m\n JOIN roots r ON r.id = m.root_id\n WHERE (?1 IS NULL OR m.id = ?1)\n AND (?2 IS NULL OR m.tmdb_id = ?2)\n ORDER BY m.title, m.year, m.id\n ",
"describe": {
"columns": [
{
"name": "id!: i64",
"ordinal": 0,
"type_info": "Integer",
"origin": {
"Table": {
"table": "movies",
"name": "id"
}
}
},
{
"name": "tmdb_id!: i64",
"ordinal": 1,
"type_info": "Integer",
"origin": {
"Table": {
"table": "movies",
"name": "tmdb_id"
}
}
},
{
"name": "title!: String",
"ordinal": 2,
"type_info": "Text",
"origin": {
"Table": {
"table": "movies",
"name": "title"
}
}
},
{
"name": "year",
"ordinal": 3,
"type_info": "Integer",
"origin": {
"Table": {
"table": "movies",
"name": "year"
}
}
},
{
"name": "wanted!: bool",
"ordinal": 4,
"type_info": "Integer",
"origin": {
"Table": {
"table": "movies",
"name": "wanted"
}
}
},
{
"name": "root_id!: i64",
"ordinal": 5,
"type_info": "Integer",
"origin": {
"Table": {
"table": "movies",
"name": "root_id"
}
}
},
{
"name": "root_path!: String",
"ordinal": 6,
"type_info": "Text",
"origin": {
"Table": {
"table": "roots",
"name": "path"
}
}
},
{
"name": "created_at!: String",
"ordinal": 7,
"type_info": "Text",
"origin": {
"Table": {
"table": "movies",
"name": "created_at"
}
}
},
{
"name": "file_count!: i64",
"ordinal": 8,
"type_info": "Integer",
"origin": "Expression"
},
{
"name": "size_on_disk!: i64",
"ordinal": 9,
"type_info": "Integer",
"origin": "Expression"
}
],
"parameters": {
"Right": 2
},
"nullable": [
false,
false,
false,
true,
false,
false,
false,
false,
false,
false
]
},
"hash": "3adb45309bbd3f1de7d968abd8e5a65d4c6a2b890a54af9d5d2d956cca783892"
}