diff --git a/extras/drift_postgres/README.md b/extras/drift_postgres/README.md index 90f12403..ce0c2dbe 100644 --- a/extras/drift_postgres/README.md +++ b/extras/drift_postgres/README.md @@ -4,8 +4,10 @@ talking to PostgreSQL databases by using the `postgres` package. ## Using this For general notes on using drift, see [this guide](https://drift.simonbinder.eu/getting-started/). +Detailed docs on getting started with `drift_postgres` are available [here](https://drift.simonbinder.eu/docs/platforms/postgres/#setup). To use drift_postgres, add this to your `pubspec.yaml` + ```yaml dependencies: drift: "$latest version" @@ -25,6 +27,21 @@ final database = AppDatabase(PgDatabase( )); ``` +Also, consider adding builder options to make drift generate postgres-specific code: + +```yaml +# build.yaml +targets: + $default: + builders: + drift_dev: + options: + sql: + dialects: + - sqlite # remove this line if you only need postgres + - postgres +``` + ## Running tests To test this package, first run diff --git a/extras/drift_postgres/build.yaml b/extras/drift_postgres/build.yaml new file mode 100644 index 00000000..1303813a --- /dev/null +++ b/extras/drift_postgres/build.yaml @@ -0,0 +1,9 @@ +targets: + $default: + builders: + drift_dev: + options: + sql: + dialects: + - sqlite # remove this line if you only need postgres + - postgres