raindrop_cli 0.1.1 copy "raindrop_cli: ^0.1.1" to clipboard
raindrop_cli: ^0.1.1 copied to clipboard

The command line tool for raindrop that generates and embeds SQL schema migrations.

💧 raindrop_cli

Pub ci coverage License: MIT


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
0
likes
160
points
175
downloads

Documentation

API reference

Publisher

verified publisherwolfenrain.dev

Weekly Downloads

The command line tool for raindrop that generates and embeds SQL schema migrations.

Repository (GitHub)
View/report issues
Contributing

Topics

#sql #database #migrations #cli

License

MIT (license)

Dependencies

analyzer, args, crypto, meta, path, raindrop, yaml

More

Packages that depend on raindrop_cli