Idempotent PostgreSQL DDL scripts

后端 未结 3 1574
日久生厌
日久生厌 2021-02-08 12:04

I\'m looking for a way to script postgreSQL schema changes in an idempotent manner.

In MSSQL I could do something like this:

if(not exists(select * from          


        
3条回答
  •  北恋
    北恋 (楼主)
    2021-02-08 12:34

    you might find this blogpost helpful: http://www.depesz.com/index.php/2008/06/18/conditional-ddl/

提交回复
热议问题