Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,24 @@ Could not determine the dependencies of task ':unifiedpush_android:compileReleas

Resolution: Ensure you have a valid Java 8 installation on your machine.

## Database

Thunder uses the [Drift database](https://drift.simonbinder.eu/) package (a wrapper around SQLite) to store information about the user's accounts, favorites, anonymous subscriptions, and user labels.

If you happen to work on a contribution which involves updating the database schema, you can follow these steps.

1. Update schema version in `lib\core\database\database.dart`
2. Add new tables/columns in `lib\core\database\tables.dart`
3. Export schema
- `dart run drift_dev schema dump lib/core/database/database.dart drift_schemas/`
4. Update migrations
- `dart run drift_dev schema steps drift_schemas/ lib/core/database/schema_versions.dart`
5. Go back to `lib\core\database\database.dart` and implement the migration function
6. Update the auto-generated db table models
- `dart run build_runner build`
7. Reformat the auto-generated files
- `dart format --set-exit-if-changed -l 200 lib`

## Conventions

While there are no specific conventions that must be followed, do try to follow best practices whenever possible.
Expand Down
Loading