💧 raindrop_cli
The command line tool for raindrop. It
generates SQL migrations by diffing your Dart schema against the last snapshot.
dart pub global activate raindrop_cli
Configuration
A raindrop.yaml next to your package:
# Required: the driver package to introspect and generate with.
driver: raindrop_sqlite
# Where your schema files live.
schemas: lib/schemas
# Where .sql migrations are written (default: migrations/).
out: migrations
# Optional: also emit the migrations as Dart source. Needed for runtimes that
# cannot read files at runtime.
dart: lib/database/migrations.dart
# Optional: "integer" (0000_, 0001_, ...) or "timestamp".
migration_naming: integer
Commands
raindrop generate --name add_users # diff the schema, write the migration
raindrop generate --dry-run -n x # show the SQL, write nothing
raindrop generate --empty -n seeds # a hand-written migration
raindrop generate --dart-only # re-emit the embedded Dart from the journal
raindrop status # config, current schema, pending changes