simolus3 / drift

Drift is an easy to use, reactive, typesafe persistence library for Dart & Flutter.
https://drift.simonbinder.eu/
MIT License
2.66k stars 372 forks source link

drift.simonbinder.eu/cli/#exporting #3264

Closed ivanesi closed 1 month ago

ivanesi commented 1 month ago

drift.simonbinder.eu/cli/#exporting

Exporting docs seems outdated. How to export a list of CREATE statements ?

simolus3 commented 1 month ago

That command is supposed to work, what error do you get running it? If the command is unavailable, what drift_dev version are you on?

ivanesi commented 1 month ago

drift_dev: ^2.15.0

% dart run drift_dev schema dump ./lib/database/app_database.dart 
Expected input and output files
% dart run drift_dev schema export
Could not find a subcommand named "export" for "dart run drift_dev schema".
simolus3 commented 1 month ago

The export subcommand has been added in drift_dev 2.20.0, so it's possible that you're on an older version that doesn't have the command yet.

ivanesi commented 1 month ago

Thanks. I had and older dart sdk version so dart pub get installed old version of the drift packages by default.