Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom MigrationNode for build #234

Merged
merged 2 commits into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion beanie/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from beanie.odm.utils.general import init_beanie
from beanie.odm.documents import Document

__version__ = "1.10.3"
__version__ = "1.10.4"
__all__ = [
# ODM
"Document",
Expand Down
4 changes: 2 additions & 2 deletions beanie/migrations/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async def build(cls, path: Path):
)
current_migration = await MigrationLog.find_one({"is_current": True})

root_migration_node = MigrationNode("root")
root_migration_node = cls("root")
prev_migration_node = root_migration_node

for name in names:
Expand All @@ -185,7 +185,7 @@ async def build(cls, path: Path):
).load_module((path / name).stem)
forward_class = getattr(module, "Forward", None)
backward_class = getattr(module, "Backward", None)
migration_node = MigrationNode(
migration_node = cls(
name=name,
prev_migration=prev_migration_node,
forward_class=forward_class,
Expand Down
19 changes: 16 additions & 3 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@

Beanie project

## [1.10.2] - 2022-02-24
## [1.10.4] - 2022-02-24

### Improvement

- Allow custom MigrationNode for build

### Implementation

- Author - [amos402](https://github.com/amos402)
- PR <https://github.com/roman-right/beanie/pull/234>

## [1.10.3] - 2022-02-29

### Improvement

Expand All @@ -12,7 +23,7 @@ Beanie project

- ISSUE <https://github.com/roman-right/beanie/issues/225>

## [1.10.2] - 2022-02-24
## [1.10.2] - 2022-02-28

### Improvement

Expand Down Expand Up @@ -762,4 +773,6 @@ how specific type should be presented in the database

[1.10.2]: https://pypi.org/project/beanie/1.10.2

[1.10.3]: https://pypi.org/project/beanie/1.10.3
[1.10.3]: https://pypi.org/project/beanie/1.10.3

[1.10.4]: https://pypi.org/project/beanie/1.10.4
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "beanie"
version = "1.10.3"
version = "1.10.4"
description = "Asynchronous Python ODM for MongoDB"
authors = ["Roman <roman-right@protonmail.com>"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_beanie.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@


def test_version():
assert __version__ == "1.10.3"
assert __version__ == "1.10.4"