Skip to content

Commit a970656

Browse files
authored
Rename SQLAlchemy 1.6 => 1.4 (#532)
In response to #506
1 parent 54d2023 commit a970656

File tree

6 files changed

+29
-29
lines changed

6 files changed

+29
-29
lines changed

codegen-examples/examples/sqlalchemy_1.6_to_2.0/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# SQLAlchemy 1.6 to 2.0 Migration Example
1+
# SQLAlchemy 1.4 to 2.0 Migration Example
22

3-
[![Documentation](https://img.shields.io/badge/docs-docs.codegen.com-blue)](https://docs.codegen.com/tutorials/sqlalchemy-1.6-to-2.0)
3+
[![Documentation](https://img.shields.io/badge/docs-docs.codegen.com-blue)](https://docs.codegen.com/tutorials/sqlalchemy-1.4-to-2.0)
44

5-
This example demonstrates how to use Codegen to automatically migrate SQLAlchemy 1.6 code to the new 2.0-style query interface. For a complete walkthrough, check out our [tutorial](https://docs.codegen.com/tutorials/sqlalchemy-1.6-to-2.0).
5+
This example demonstrates how to use Codegen to automatically migrate SQLAlchemy 1.4 code to the new 2.0-style query interface. For a complete walkthrough, check out our [tutorial](https://docs.codegen.com/tutorials/sqlalchemy-1.4-to-2.0).
66

77
## How the Migration Script Works
88

@@ -94,7 +94,7 @@ python run.py
9494

9595
## Learn More
9696

97-
- [Full Tutorial](https://docs.codegen.com/tutorials/sqlalchemy-1.6-to-2.0)
97+
- [Full Tutorial](https://docs.codegen.com/tutorials/sqlalchemy-1.4-to-2.0)
9898
- [SQLAlchemy Documentation](https://docs.sqlalchemy.org/en/20/)
9999
- [What's New in SQLAlchemy 2.0](https://docs.sqlalchemy.org/en/20/changelog/migration_20.html)
100100
- [Codegen Documentation](https://docs.codegen.com)

codegen-examples/examples/sqlalchemy_1.6_to_2.0/run.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
from codegen.sdk.core.expressions.chained_attribute import ChainedAttribute
55

66

7-
@codegen.function("sqlalchemy-1.6-to-2.0")
7+
@codegen.function("sqlalchemy-1.4-to-2.0")
88
def run(codebase: Codebase):
99
"""
10-
Convert SQLAlchemy 1.6 codebases to 2.0.
10+
Convert SQLAlchemy 1.4 codebases to 2.0.
1111
"""
1212
files_modified = 0
1313
functions_modified = 0
1414

15-
print("\nStarting SQLAlchemy 1.6 to 2.0 migration...")
15+
print("\nStarting SQLAlchemy 1.4 to 2.0 migration...")
1616

1717
for file in codebase.files:
1818
file_modified = False
@@ -101,5 +101,5 @@ def run(codebase: Codebase):
101101
repo_path = "./input_repo"
102102
print("Initializing codebase...")
103103
codebase = Codebase(repo_path)
104-
print("Running SQLAlchemy 1.6 to 2.0 codemod...")
104+
print("Running SQLAlchemy 1.4 to 2.0 codemod...")
105105
run(codebase)

docs/tutorials/at-a-glance.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Explore our tutorials to learn how to use Codegen for various code transformatio
5151
Update API calls, handle breaking changes, and manage bulk updates across your codebase.
5252
</Card>
5353
<Card
54-
title="SQLAlchemy 1.6 to 2.0"
54+
title="SQLAlchemy 1.4 to 2.0"
5555
icon="layer-group"
56-
href="/tutorials/sqlalchemy-1.6-to-2.0"
56+
href="/tutorials/sqlalchemy-1.4-to-2.0"
5757
>
5858
Update SQLAlchemy code to use the new 2.0-style query interface and patterns.
5959
</Card>

docs/tutorials/sqlalchemy-1.6-to-2.0.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
2-
title: "Migrating from SQLAlchemy 1.6 to 2.0"
3-
sidebarTitle: "SQLAlchemy 1.6 to 2.0"
4-
description: "Learn how to migrate SQLAlchemy 1.6 codebases to 2.0 using Codegen"
2+
title: "Migrating from SQLAlchemy 1.4 to 2.0"
3+
sidebarTitle: "SQLAlchemy 1.4 to 2.0"
4+
description: "Learn how to migrate SQLAlchemy 1.4 codebases to 2.0 using Codegen"
55
icon: "layer-group"
66
iconType: "solid"
77
---
88

9-
Migrating from [SQLAlchemy](https://www.sqlalchemy.org/) 1.6 to 2.0 involves several API changes to support the new 2.0-style query interface. This guide will walk you through using Codegen to automate this migration, handling query syntax, session usage, and ORM patterns.
9+
Migrating from [SQLAlchemy](https://www.sqlalchemy.org/) 1.4 to 2.0 involves several API changes to support the new 2.0-style query interface. This guide will walk you through using Codegen to automate this migration, handling query syntax, session usage, and ORM patterns.
1010

1111
<Info>
12-
You can find the complete example code in our [examples repository](https://github.com/codegen-sh/codegen-sdk/tree/develop/codegen-examples/examples/sqlalchemy_1.6_to_2.0).
12+
You can find the complete example code in our [examples repository](https://github.com/codegen-sh/codegen-sdk/tree/develop/codegen-examples/examples/sqlalchemy_1.4_to_2.0).
1313
</Info>
1414

1515
## Overview

src/codegen/cli/mcp/resources/system_prompt.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6026,9 +6026,9 @@ def get_method_context(method):
60266026
Update API calls, handle breaking changes, and manage bulk updates across your codebase.
60276027
</Card>
60286028
<Card
6029-
title="SQLAlchemy 1.6 to 2.0"
6029+
title="SQLAlchemy 1.4 to 2.0"
60306030
icon="layer-group"
6031-
href="/tutorials/sqlalchemy-1.6-to-2.0"
6031+
href="/tutorials/sqlalchemy-1.4-to-2.0"
60326032
>
60336033
Update SQLAlchemy code to use the new 2.0-style query interface and patterns.
60346034
</Card>
@@ -9045,17 +9045,17 @@ def temp_dir():
90459045
90469046
90479047
---
9048-
title: "Migrating from SQLAlchemy 1.6 to 2.0"
9049-
sidebarTitle: "SQLAlchemy 1.6 to 2.0"
9050-
description: "Learn how to migrate SQLAlchemy 1.6 codebases to 2.0 using Codegen"
9048+
title: "Migrating from SQLAlchemy 1.4 to 2.0"
9049+
sidebarTitle: "SQLAlchemy 1.4 to 2.0"
9050+
description: "Learn how to migrate SQLAlchemy 1.4 codebases to 2.0 using Codegen"
90519051
icon: "layer-group"
90529052
iconType: "solid"
90539053
---
90549054
9055-
Migrating from [SQLAlchemy](https://www.sqlalchemy.org/) 1.6 to 2.0 involves several API changes to support the new 2.0-style query interface. This guide will walk you through using Codegen to automate this migration, handling query syntax, session usage, and ORM patterns.
9055+
Migrating from [SQLAlchemy](https://www.sqlalchemy.org/) 1.4 to 2.0 involves several API changes to support the new 2.0-style query interface. This guide will walk you through using Codegen to automate this migration, handling query syntax, session usage, and ORM patterns.
90569056
90579057
<Info>
9058-
You can find the complete example code in our [examples repository](https://github.com/codegen-sh/codegen-examples/tree/7b978091c3153b687c32928fe10f05425e22f6a5/examples/sqlalchemy_1.6_to_2.0).
9058+
You can find the complete example code in our [examples repository](https://github.com/codegen-sh/codegen-examples/tree/7b978091c3153b687c32928fe10f05425e22f6a5/examples/sqlalchemy_1.4_to_2.0).
90599059
</Info>
90609060
90619061
## Overview

src/codegen/sdk/system-prompt.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6304,9 +6304,9 @@ Explore our tutorials to learn how to use Codegen for various code transformatio
63046304
Update API calls, handle breaking changes, and manage bulk updates across your codebase.
63056305
</Card>
63066306
<Card
6307-
title="SQLAlchemy 1.6 to 2.0"
6307+
title="SQLAlchemy 1.4 to 2.0"
63086308
icon="layer-group"
6309-
href="/tutorials/sqlalchemy-1.6-to-2.0"
6309+
href="/tutorials/sqlalchemy-1.4-to-2.0"
63106310
>
63116311
Update SQLAlchemy code to use the new 2.0-style query interface and patterns.
63126312
</Card>
@@ -9712,17 +9712,17 @@ def temp_dir():
97129712

97139713

97149714
---
9715-
title: "Migrating from SQLAlchemy 1.6 to 2.0"
9716-
sidebarTitle: "SQLAlchemy 1.6 to 2.0"
9717-
description: "Learn how to migrate SQLAlchemy 1.6 codebases to 2.0 using Codegen"
9715+
title: "Migrating from SQLAlchemy 1.4 to 2.0"
9716+
sidebarTitle: "SQLAlchemy 1.4 to 2.0"
9717+
description: "Learn how to migrate SQLAlchemy 1.4 codebases to 2.0 using Codegen"
97189718
icon: "layer-group"
97199719
iconType: "solid"
97209720
---
97219721

9722-
Migrating from [SQLAlchemy](https://www.sqlalchemy.org/) 1.6 to 2.0 involves several API changes to support the new 2.0-style query interface. This guide will walk you through using Codegen to automate this migration, handling query syntax, session usage, and ORM patterns.
9722+
Migrating from [SQLAlchemy](https://www.sqlalchemy.org/) 1.4 to 2.0 involves several API changes to support the new 2.0-style query interface. This guide will walk you through using Codegen to automate this migration, handling query syntax, session usage, and ORM patterns.
97239723

97249724
<Info>
9725-
You can find the complete example code in our [examples repository](https://github.com/codegen-sh/codegen-examples/tree/7b978091c3153b687c32928fe10f05425e22f6a5/examples/sqlalchemy_1.6_to_2.0).
9725+
You can find the complete example code in our [examples repository](https://github.com/codegen-sh/codegen-examples/tree/7b978091c3153b687c32928fe10f05425e22f6a5/examples/sqlalchemy_1.4_to_2.0).
97269726
</Info>
97279727

97289728
## Overview

0 commit comments

Comments
 (0)