简体   繁体   中英

How can I keep track of database schema changes when using raw sql?

I have decided for my project to use raw sql queries instead of using an ORM, such as sequelize, to give me more control over my queries. Plus I just prefer writing raw sql queries.

I am wondering what is the best way to keep track of my DB schema changes so I can easily rollback if need be? I can't seem to find any packages which do just this.

By migrations I assume you mean schema changes.

There are packages that help to track schema changes, even if you are not using an ORM. Here are a few:

Stack Overflow is not supposed to be a place for product recommendations. We can't guess at which of these products will be best for your needs. So I encourage you to read about each of them and try them out, and see which one is best for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM