|
|
|
|
|
by bytefish
229 days ago
|
|
If you are using SQL Server, then SQL Server Database Projects are an amazing tool to work with. I found them to generate high-quality migration scripts and it makes it easy to diff against an existing database. ORMs are good up until the point you need to include SQL Views, Stored Procedures, Functions, User-defined Types… which is usually the point the ORM abstractions begin to crack (and every SQL Server database I use include them). For PostgreSQL I usually hand-write the scripts, because it is easier, than fighting against an ORM. I heard the Redgate tooling is also great to work with, but I’ve never used it personally. |
|
From there, Atlas handles diffing, planning, and execution. This is similar to importing modules in TF, but for database schemas in Atlas. See this example: https://atlasgo.io/guides/orms/sqlalchemy
Disclaimer: I'm involved with Atlas.