## Summary
<!--Explain briefly what goes wrong and explain why you believe this is a bug and not the intended behavior of SQLite (if it is not a crash).-->**No review yet**

## Minimized query

```sql
PRAGMA legacy_alter_table = FALSE;
PRAGMA fullfsync;
PRAGMA cache_spill;
PRAGMA count_changes = FALSE;
.dbconfig fk off
CREATE TABLE "p1"(a PRIMARY KEY, b UNIQUE);
CREATE TABLE c1(x, y, z REFERENCES p1(c));
CREATE TABLE c2(x, y, z, w REFERENCES p1(b));
ALTER TABLE c1 DROP COLUMN z;
ALTER TABLE c2 DROP COLUMN z;
SELECT sql FROM sqlite_schema WHERE name IN ('c1', 'c2');

DELETE FROM c1 WHERE y IS NULL RETURNING *;
SELECT * FROM p1 WHERE a = (SELECT a FROM p1 t2 WHERE t2.a = p1.a LIMIT CAST(1 AS NCHAR(55)));
PRAGMA max_page_count;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_p1_6094 ON p1(lower(b)) WHERE b IS NOT NULL;
ANALYZE p1;
DROP TABLE IF EXISTS c2;
PRAGMA wal_checkpoint('TRUNCATE');
DELETE FROM c1 WHERE rowid = 89;
ANALYZE p1;
PRAGMA ignore_check_constraints = FALSE;
```

## Actual output

```sql
0
483
CREATE TABLE c1(x, y)
CREATE TABLE c2(x, y, w REFERENCES p1(b))
1073741823
0|-1|-1
```

## Expectation

```sql
0
483
CREATE TABLE c1(x, y)
CREATE TABLE c2(x, y, w REFERENCES p1(b))
4294967294
0|-1|-1
```

## Flag

```

```

