digit_data_model 1.5.2
digit_data_model: ^1.5.2 copied to clipboard
The digit_data_model package is a data modeling library. It defines various classes, enums, and functions.
1.5.2 #
- DB schema:
schemaVersion12 → 13. Outside-household sites (Transit Posts, Outside Household Places) are stored as facilities. The v13 migration adds:facility: nullableclient_reference_id,latitude,longitude,location_accuracy(a copy of the address GPS, so the generic search can order sites by__distance)project_facility: nullableclient_reference_id(app-local, never sent to the server)- Indexes
facility_clientref,facility_usage,project_facility_clientrefvia_createOutsideHouseholdSiteIndexes(), also run on fresh install and in thebeforeOpenbackfill (IF NOT EXISTS).sql_store.g.dartregenerated
FacilityModel/ProjectFacilityModel: optionalclientReferenceId, so sites and project links can be created on the device before the server assigns anid.FacilityModel.companionalso writes the address lat/long/accuracy into the new facility columns. Mappers regeneratedFacilitySearchModel/ProjectFacilitySearchModel:clientReferenceIdfilter.FacilityLocalRepository.searchalso filters byusageandboundaryCode(address locality) and returnsclientReferenceId,name,nonRecoverableError,additionalFieldsand the addresslocality;ProjectFacilityLocalRepository.searchhonoursidandclientReferenceIdFacilityLocalRepository.create/bulkCreatealso write the facility's address and locality rows. New static helperaddressKeyOf- Behaviour change:
createonFacilityLocalRepositoryandProjectFacilityLocalRepositorynow defaults tocreateOpLog: true, so sites and links created on the device are uploaded. Downloads throughbulkCreatestill write no oplog entry - New
applyServerGeneratedId({clientReferenceId, serverGeneratedId, rowVersion})on both repositories swaps the placeholder id for the server id after upload; for facilities it also repoints queuedproject_facility.facilityIdvalues FacilityOpLogManager/ProjectFacilityOpLogManager: client reference id isclientReferenceId ?? id; an entity whoseid == clientReferenceIdis treated as unsyncedFacilityAdditionalFields/ProjectFacilityAdditionalFields:versiondefaults to1instead of being required, so planner-created sites with a null schema/version decodeProjectFacilityRemoteRepository.search: optionalonlyOutsideHouseholdSitesflag to fetch only the project's outside-household site linksProjectCycleDelivery: optionaldeliveryMethod, used to scope deliveries by the active delivery method per flow moduleBoundaryModel:newSettlementBoundaryType(NEW_SETTLEMENT) and theNewSettlementBoundaryextension (isNewSettlement,selectionKey,displayName(translate)) for worker-added settlements at the last boundary level.BoundaryBlocde-duplicates selections byselectionKey, since new settlements share their parent's codeBoundaryBloc:BoundaryFindEventfirst emitsloading: true, so a re-login that finds the same boundaries no longer leaves listeners waitingBoundaryLocalRepository.search(isSingle): one boundary per level ordered byboundaryNum, chained from the project's own boundary code instead of whichever root row came first; rows with a nullboundaryNumor emptycodeare skippedBoundaryLocalRepository.deleteawaits the SQL delete, so a clear followed by fresh inserts can't race
1.5.1 #
StockModel: accept the server'swayBillNumber(capital B) response key without changing what the mobile client sends. A class-levelMappingHookonStockModelcopieswayBillNumber→waybillNumberin the JSON map before decoding;toJsonand every Dart caller, DB column, and{{item.waybillNumber}}template are unchanged.stock.mapper.dartregenerated.
1.5.0 #
- Add
hierarchyTypefield toPgrServiceModelso the mobile PGR create request can include the project's hierarchy at the top level of theserviceobject (matches the web client's payload)
1.4.0 #
- Multi-hierarchy support
- Moved
hierarchyTypefrom build-time env to per-project runtime (addedhierarchyTypefield toProjectand its mapper) - Centralized country-suffix stripping in
setHierarchyType - Stopped splitting
hierarchyTypeon first underscore
- Moved
- Search improvements
- Added
within,equalsAny,containsAll, andmatchesoperators in SQL store - Added indexes for
name,individual,household,address, andidentifiertables - Backfilled the same indexes in the schemaVersion 11 migration so upgrades get the perf benefit
- Cross-table search support with fresh-install seeding and on-open backfill of hot-path indexes; post-migration
ANALYZE
- Added
- Hardened SQLCipher
PRAGMA key/ATTACH DATABASE KEYcallsites via_sqlCipherKeyPragma/_assertHexKeyhelpers and hex-blob literal form - Added pre-logout encryption backup for the SQLCipher key
- Added attendance entities, repositories, and typedefs for attendance log and register
- Moved registration-delivery entities into the data model package
- Extended stock/referral APIs
- Migration script for stock table
hf_referralfields + mapper, stock model fields + mapperin-transithandling and stock/referral downsync fixeslistensupport and update-operation handling on UserAction oplogbeneficiaryTag/resourceTagonuser_actionmodel
- Added notification unregister flow (oplog entry field)
- Data repository
searchgainedlastChangedSincepropagation across attendance, hf_referral, pgr_service, stock, attendance_register remote repositories - Hardened Dio exception capture to preserve response payloads and endpoint context
1.3.0 #
- Implemented database encryption using SQLCipher
- Replaced
sqlite3_flutter_libswithsqlcipher_flutter_libsandsqlite3 - Added
DatabaseMigrationResultenum for migration status tracking - Added encryption key support in
LocalSqlDataStoreconstructor
- Replaced
- Moved registration delivery, inventory_management, referral_management, closed_household entities to data_model
- Moved local and remote package repositories for all moved entities
- Added
lastChangedSinceparameter toRemoteRepository.searchfor incremental sync - Added
lastChangedSincetoProductVariantRemoteRepositoryandProjectResourceRemoteRepositorysearch methods - Added
namefield toDeliveryProductVariantin project_type model - Changed
orderfield type frominttoStringinAttributesModel - Fixed oplog update operations with null
serverGeneratedIdby copying from create record - Updated
TemplateConfig.navigateToto handle empty map{}as null using custom deserializer - Added SQL ordering and improved inventory stock grouping
- Updated
waybillNumberin stock model
1.2.0-dev.2-console #
- Modified DioException to throw captured error
1.1.4 #
- Updated user_action entity and table with beneficiaryTag and resourceTag fields
1.2.0-dev.1-console #
- Renamed referenceId to referenceID in project model
- Made individualClientReferenceId mandatory in identifier
1.1.2+1 #
- Updated encryption utils function to compress and decompress data
1.1.2 #
- Added tag for attendee table
- Updated to latest components
- Added utils function to encrypt and decrypt
1.1.1 #
- Added name field in projectProductVariant
1.1.0 #
- Merged Enumeration and IdGen
- Updated target type to string from enum
- Updated serviceAttribute with id and serviceClientReferenceId
- Updated identifier with individualId and individualClientReferenceId
- Modified migration scripts
1.0.7-dev.3-enumeration #
- Updated service attribute table with serviceClientReferenceId
1.0.7-dev.2-enumeration #
- Updated member relation table with client audit details
1.0.7-dev.1-enumeration #
- Updated new memberRelationship column in member
- Added new member relationship table
- Added tenant id in dump error call
1.0.6+3 #
- Added additionalFields to individual search entity
1.0.6+2 #
- Added more enum types in beneficiaryType
1.0.7-dev.2-idGen #
- Modified Identifier table and model
- Added individualId and individualClientReferenceId
- Updated Migration script for the identifier
- Modified search query with individualClientReferenceId
- BugFix:
- Updated bulk create to insert all the identifiers instead of first index
1.0.7-dev.1-idGen #
1.0.6+1 #
- Added PRODUCT as enum in beneficiaryType
- Updated digit_ui_components to latest version
1.0.6 #
- Added localityCode in attendance table
- Added relatedClientReferenceId in service table
- Added household type in household table to support CLF
- Updated migration script
1.0.5-dev.3 #
- Added household type in household table to support CLF
1.0.5-dev.2 #
- Added localityCode in attendance table and modified migration script
- Added relatedClientReferenceId in service table and modified migration script
1.0.5 #
- Upgrade to Flutter 3.22
- Added project_type in Project Table
- Changed isActive to bool in Service Attribute table
1.0.5-dev.1 #
- Merged pgr and survey_form package changes
1.0.4+1 #
- Bug Fix:
- Updated syncRetryCount,syncRetryInterval and errorPath to dynamic
1.0.4 #
- Added user_action entity for digit_location_tracker package
1.0.3+3 #
- Added tenant id to query params and RequestInfo for security gateway fixes
- Updated additionalDetails field to service definition attributes model
- Changed the object type of additionalDetails in Service model from String to Map
1.0.3+2 #
- Updated beneficiary type target model and table to string
- Updated project type beneficiary type model and table to BeneficiaryType enum
1.0.4-dev.7-uniqueId #
- Modified identifierType of unique beneficiary id
1.0.4-dev.6-uniqueId #
- Added additionalDetails field to service definition attributes model
1.0.4-dev.5-uniqueId #
-
Added identifierType enum entity
-
Added identifierType and id as primary key to identifier table
-
Updated oplog transactions to synchronous - fix for write transaction lock
-
Same change in 1.0.3-hotfix, 1.0.4-dev.3
1.0.3+2 #
- Updated beneficiary type target model and table to string
- Updated project type beneficiary type model and table to BeneficiaryType enum
1.0.3+1 #
- Updated oplog transactions to synchronous - fix for write transaction lock
1.0.4-dev.4 #
- synced with 1.0.4-dev.3 changes
1.0.4-dev.3 #
- Updated oplog transactions to synchronous - fix for write transaction lock
- Same change in 1.0.3-hotfix, 1.0.4-dev.3
1.0.4-dev.2 #
- Removed Service and Service Definition models
- Removed Service repositories and Service blocs to integrate in checklist package
1.0.4-dev.1 #
- Separated PGR Package
- Moved Models, Bloc, Repositories related to PGR Package
1.0.3 #
- Added localization table
- Updated individual local search results with user uuid mapping
1.0.3-dev.4 #
- Updated individual local search results with user uuid mapping
1.0.3-dev.3 #
- Created localization table
- Creation of the localization table.
1.0.3-dev.2 #
- Reverted user_actions db changes to accommodate closed_household flow changes
- Reverted user_actions database changes to support closed_household flow changes.
1.0.3-dev.1 #
- Added new user_actions db
- Added a new user_actions database.
1.0.2 #
- Added try catch for local repository to handle db lock
- Implemented try-catch for local repository to handle database locks.
1.0.1 #
- Added Service and Service Definition Bloc
- Introduction of Service and Service Definition Bloc.
1.0.0 #
- Initial stable release
- First stable release of the Digit Data Model.
0.0.0-dev.3 #
- Supports boundary v2 and updated single entities to list for all search models
- Added support for boundary v2 and updated single entities to lists for all search models.
0.0.0-dev.2 #
- Boundary v2 Integrated, to use Boundary v1 0.0.0-dev.1 version can be used
- Integration of Boundary v2 with the option to use Boundary v1 version 0.0.0-dev.1.
0.0.0-dev.1 #
- Digit Data Model Initial Release
- This marks the initial release of the Digit Data Model.