go-pg / migrations

SQL database migrations for Golang go-pg and PostgreSQL
https://godoc.org/github.com/go-pg/migrations
BSD 2-Clause "Simplified" License
309 stars 59 forks source link

"init" command no longer fails if called twice #81

Closed dmerejkowsky closed 4 years ago

dmerejkowsky commented 4 years ago

Done by using CREATE TABLE IF NOT EXISTS instead of just CREATE TABLE in collection.createTable

Rationale: when you implement continuous delivery with different environments, you can run migrator init at each deployment without having it fail.

vmihailenco commented 4 years ago

Thanks