isar / isar/hive

How to manage structural changes (ALTER) to an existing database?

Open
#1,144 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

**Question**
It has often happened to me (fortunately so far only before the distribution of the app but it could also happen after), having to modify the database structure by adding new columns.
The problem I encounter every time is that, especially if the new fields are not NULLABLE, the app crashes on startup because empty values are found in the fields.
What is the correct way to avoid this problem?

**Version**
- Platform: iOS, Android
- Flutter version: 3.3.10
- Hive version: 2.2.3

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing Hive 2.2.3's documented approach to structural changes and schema evolution for Flutter apps on iOS and Android. Document the supported process for adding columns, especially non-nullable fields, and show how an app can start successfully without empty-value failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
databases, mobile
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.