Add missing indexes to sqlite_orm storage which are created for messages table and media table.
Make_index() usage example: https://github.com/fnc12/sqlite_orm/blob/master/examples/index.cpp#L18
Differential D5150
[native/sqlite] add missing indexes to `sqlite_orm` structure kamil on Sep 15 2022, 7:41 AM. Authored by Tags None Referenced Files
Details Add missing indexes to sqlite_orm storage which are created for messages table and media table. Make_index() usage example: https://github.com/fnc12/sqlite_orm/blob/master/examples/index.cpp#L18
Diff Detail
Event TimelineComment Actions It the same as in constraint case, I responded here: https://phab.comm.dev/D5148#152210 Comment Actions Looks good to me Based on your test plan it looks like we can include these make_index arguments to make_storage(...) before the make_table ones, but wonder if it'd make more sense to sequence them after? Comment Actions Yeah, I agree it will make more sense but I decided to sequence like this place due to two reasons:
Comment Actions Could you make a test to build and run the app with indexes being created after tables and share the results here? Regardless of the result I would put a short comment above those lines that explain the order here since it might be confusing for future developers. Comment Actions There it is: ibc++abi: terminating with uncaught exception of type std::__1::system_error: no such table: main.media: SQL logic error dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/kamil/Library/Developer/Xcode/DerivedData/Comm-ezpickwrqqgmkohgomffmhsjkkgj/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/kamil/Library/Developer/Xcode/DerivedData/Comm-ezpickwrqqgmkohgomffmhsjkkgj/Build/Products/Debug-iphonesimulator terminating with uncaught exception of type std::__1::system_error: no such table: main.media: SQL logic error CoreSimulator 802.6.1 - Device: iPhone 13 mini (B47851C4-C23A-4939-B376-23E63FC33D3C) - Runtime: iOS 15.5 (19F70) - DeviceType: iPhone 13 mini It fails because it tries to create an index on non-existing table.
Goog call - done. |