[native] Add pinned_count column to SQLite threads table
Summary:
We need to add the pinned_count column to SQLite threads table, so when we (in the next diff) try to store pinnedCount in ThreadInfos, the ClientDB will have the pinned_count.
As mentioned in the test plan:
I'm not entirely sure if we really even need to consider a case where a new client will already have the column besides me in development work, so I can also just remove that check entirely and just add the column. I ran into this inconsistency while working off of my modified schema and running a migration on top of that
Part of https://linear.app/comm/issue/ENG-3396/store-the-number-of-pinned-messages-in-threadinfo
Depends on D7175
Test Plan:
Confirm the migration works
- git checkout master
- Build the app from xcode
- Connect to the SQLite database and confirm there is no pinned_count column
- git checkout pinned_messages
- Rebuild the app from xcode without deleting it
- Connect to the SQLite database and confirm the existence of a pinned_count column
Confirm the schema works
- git checkout pinned_messages
- Delete the app from the simulator
- Build the app from xcode
- Connect to the SQLite database and confirm the existence of a pinned_count column
Reviewers: atul, tomek, kamil
Reviewed By: atul, kamil
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D7202