Skip to content

Commit

Permalink
[bump] version 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
schultek committed Sep 15, 2022
1 parent 14045b3 commit cf69f4a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 0.8.0

- Added support for serialization through custom annotations
- Added support for manual migration output to .sql files
- Improved migration cli and added support for manual migration output to .sql files
- Fixed bug with default views and value decoding

# 0.7.0
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ await db.users.updateOne(UserUpdateRequest(id: 'abc', name: 'Tom'));
You can specify a custom query with custom sql by extending the `Query<T, U>` class.
You will then need to implement the `Future<T> apply(Database db, U params)` method.

Additionally to the model tabels, you can query the model views to automatically get all resolved
Additionally to the model tables, you can query the model views to automatically get all resolved
relations without needing to do manual joins. Table names are always plural, e.g. `users` and view
names are in the format as `complete_user_view`.

Expand All @@ -408,7 +408,7 @@ Stormberry comes with a database migration tool, to create or update the schema

To use this run the following command from the root folder of your project.
```
dart pub run stormberry
dart pub run stormberry migrate
```

In order to connect to your database, provide the following environment variables:
Expand All @@ -419,7 +419,8 @@ confirmation before applying the changes or aborting.

The tool supported the following options:

- `-db=<db_name>`: Specify the database name. Tool will ask if not specified.
- `-h`: Shows the available options.
- `--db=<db_name>`: Specify the database name. Tool will ask if not specified.
- `--dry-run`: Logs any changes to the schema without writing to the database, and exists
with code 1 if there are any.
- `--apply-changes`: Apply any changes without asking for confirmation.
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: stormberry
description: Access your postgres database effortlessly from dart code.
version: 0.7.0
version: 0.8.0
repository: https://github.com/schultek/stormberry
issue_tracker: https://github.com/schultek/stormberry/issues

Expand All @@ -19,7 +19,7 @@ dependencies:
dev_dependencies:
build_runner: ^2.2.0
lints: ^2.0.0
test: ^1.21.6
test: ^1.21.0

environment:
sdk: '>=2.16.0 <3.0.0'
2 changes: 1 addition & 1 deletion test/multi_schema_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void main() {
test('Migrating schemas', () async {
var proc = await Process.start(
'dart',
'run stormberry --apply-changes'.split(' '),
'run stormberry migrate --apply-changes'.split(' '),
workingDirectory: 'test/packages/multi_schema',
environment: {
'DB_HOST': 'localhost',
Expand Down
2 changes: 1 addition & 1 deletion test/serialization_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void main() {
expect(lines[0], equals('{"id":"abc","name":"Tom","securityNumber":"12345"}'));
expect(lines[1], equals('DefaultUserView(id: abc, name: Alex, securityNumber: 12345)'));
expect(lines[2], equals('{"id":"01","member":{"id":"def","name":"Susan"}}'));
expect(lines[3], equals('{"companyId":null,"id":"abc","name":null,"securityNumber":"007"}'));
expect(lines[3], equals('{"id":"abc","name":null,"securityNumber":"007"}'));
expect(lines[4], equals(''));

}, timeout: Timeout(Duration(seconds: 60)));
Expand Down

0 comments on commit cf69f4a

Please sign in to comment.