Skip to content

Releases: nonebot/plugin-orm

🔖 Release 0.3.0

22 Oct 07:30
e688568

Choose a tag to compare

🔖 Release 0.2.4

19 Oct 11:57
d6806ff

Choose a tag to compare

🔖 Release 0.2.3

17 Oct 17:51
ffcb953

Choose a tag to compare

🔖 Release 0.2.2

16 Oct 18:39
0d9b9d5

Choose a tag to compare

🔖 Release 0.2.1

15 Oct 20:01
30821b5

Choose a tag to compare

🔖 Release 0.2.0

15 Oct 19:09
a2d2d94

Choose a tag to compare

Notable Changes

单数据库模板 (generic)

--- a/migrations/env.py
+++ b/migrations/env.py
@@ -59,7 +59,7 @@ async def run_migrations_online() -> None:

     这种情况下,我们需要为 context 创建一个连接。
     """
-    async with engine.begin() as connection:
+    async with engine.connect() as connection:
         await connection.run_sync(do_run_migrations)

多数据库模板 (multidb)

--- a/migrations/env.py
+++ b/migrations/env.py
@@ -52,6 +52,7 @@ def run_migrations_offline() -> None:
     # 使用 --sql 选项的情况下,将每个引擎的迁移写入到单独的 .sql 文件中。

     for name, engine in engines.items():
+        config.print_stdout(f"迁移数据库 {name or '<default>'} 中 ...")
         file_ = f"{name}.sql"
         with open(file_, "w") as buffer:
             context.configure(
@@ -62,9 +63,7 @@ def run_migrations_offline() -> None:
                 dialect_opts={"paramstyle": "named"},
                 **plugin_config.alembic_context,
             )
-            with context.begin_transaction(), config.status(
-                f"迁移数据库 {name or '<default>'} 中"
-            ):
+            with context.begin_transaction():
                 context.run_migrations(name=name)
             config.print_stdout(f"将输出写入到 {file_}")
--- a/a.tree
+++ b/b.tree
@@ -1,8 +1,9 @@
 .
 └── nonebot_plugin
     ├── config.py
     ├── __init__.py
     └── migrations
         ├── 21e03401e435_.py
         ├── 595fd3d5f5b4_.py
-        └── e04c11aa30b7_.py
+        ├── e04c11aa30b7_.py
+        └── __init__.py

What's Changed

Full Changelog: v0.1.2...v0.2.0

🔖 Release 0.1.2

11 Oct 18:38
334552c

Choose a tag to compare

🔖 Release 0.1.1

07 Oct 08:27
8139664

Choose a tag to compare

🔖 Release 0.1.0

06 Oct 13:40
3e3ec7b

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/nonebot/plugin-orm/commits/v0.1.0