SQLite doesn't repoint table aliases in partial index conditions on table rename which breaks the documented table alteration procedure. Thanks Pēteris Caune for the report.