goose
0.2.0, released 2 years ago by wolfenrain.dev
A minimalistic framework for managing code and database migrations.
What it does
Goose provides a platform-agnostic structure for migrating code or databases up and down. It uses a programmable API with zero dependencies to track and execute migrations sequentially.
AI-written summary of version 0.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to run sequential migrations for local databases or app data structures.
- You want a zero-dependency migration runner that works across platforms.
Skip it when
- You are looking for automatic schema generation or an opinionated ORM migration tool.
- You only need simple key-value persistence without migration history.
Strengths
- Zero dependencies
- Platform-agnostic and database-agnostic
- Programmable API supporting up and down migrations with state streams
Weaknesses
- Requires manual implementation of storage and retrieval for migration keys
- No built-in database drivers or out-of-the-box persistence adapters
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Simply add goose to pubspec.yaml and implement your migration logic and key storage functions.
class MyMigration extends Migration {
const MyMigration() : super('my_unique_migration_id');
Future<void> down() async {}
Future<void> up() async {}
}
void main() async {
int? migrationKey;
final goose = Goose(
retrieve: () async => migrationKey,
store: (key) async => migrationKey = key,
migrations: const [MyMigration()],
);
await goose.up();
}Alternatives
Packages that do the same job and could replace goose.
- async_extension
Dart async extensions for Future, FutureOr, and performance improvements.
74Compare - path_parsing
Pure Dart library for parsing SVG path strings and generating Dart path code.
50Compare - http_status_code
A Dart library providing constants and helpers for HTTP status codes.
39Compare