ef4722e1dd
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>
82 lines
3.0 KiB
JSON
82 lines
3.0 KiB
JSON
{
|
|
"db_name": "SQLite",
|
|
"query": "\n SELECT se.id AS \"season_id!: i64\",\n se.number AS \"season_number!: i64\",\n s.title AS \"series_title!: String\",\n s.tvdb_id AS series_tvdb_id,\n s.original_language,\n (\n EXISTS (\n SELECT 1 FROM episodes e\n WHERE e.season_id = se.id\n AND e.wanted = 1\n AND NOT EXISTS (\n SELECT 1 FROM media_files f\n WHERE f.owner_kind = 'episode' AND f.owner_id = e.id\n )\n AND NOT EXISTS (\n SELECT 1 FROM grabs g\n WHERE g.target_kind = 'episode' AND g.target_id = e.id\n AND g.state IN ('sent', 'downloaded', 'imported')\n )\n )\n AND NOT EXISTS (\n SELECT 1 FROM grabs g\n WHERE g.target_kind = 'season' AND g.target_id = se.id\n AND g.state IN ('sent', 'downloaded', 'imported')\n )\n ) AS \"is_gap!: bool\"\n FROM seasons se\n JOIN series s ON s.id = se.series_id\n WHERE se.id = ?\n AND s.blocked = 0\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "season_id!: i64",
|
|
"ordinal": 0,
|
|
"type_info": "Integer",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "seasons",
|
|
"name": "id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "season_number!: i64",
|
|
"ordinal": 1,
|
|
"type_info": "Integer",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "seasons",
|
|
"name": "number"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "series_title!: String",
|
|
"ordinal": 2,
|
|
"type_info": "Text",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "series",
|
|
"name": "title"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "series_tvdb_id",
|
|
"ordinal": 3,
|
|
"type_info": "Integer",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "series",
|
|
"name": "tvdb_id"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "original_language",
|
|
"ordinal": 4,
|
|
"type_info": "Text",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "series",
|
|
"name": "original_language"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "is_gap!: bool",
|
|
"ordinal": 5,
|
|
"type_info": "Integer",
|
|
"origin": "Expression"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Right": 1
|
|
},
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
true,
|
|
false
|
|
]
|
|
},
|
|
"hash": "519d77ceec9ce13aa65abed28ea32db6568360e8c3fc7e31e968508d88c1bc67"
|
|
}
|