Pg: IF NOT EXISTS Option for Create Table

Created on 2 Apr 2017  路  2Comments  路  Source: go-pg/pg

I would like to suggest a new option for orm.CreateTableOptions that will use "IF NOT EXISTS" syntax when creating tables. This is useful in my application as I attempt to initialize all tables using CreateTable on application start. I can only assume it would be equally as useful for others.

Most helpful comment

Added PR of my own implementation. I hope it's an acceptable request and solution!

All 2 comments

Added PR of my own implementation. I hope it's an acceptable request and solution!

I think it's useful advice

Was this page helpful?
0 / 5 - 0 ratings

Related issues

enchantner picture enchantner  路  3Comments

eicca picture eicca  路  3Comments

owentran picture owentran  路  6Comments

l0gicgate picture l0gicgate  路  5Comments

m-kad picture m-kad  路  3Comments