Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Postgres ¶
type Postgres struct {
DbMap *gorp.DbMap
URI string
SchemaPath string
MaxIdleConns int
MaxOpenConns int
// contains filtered or unexported fields
}
func (*Postgres) Clear ¶
Clear deletes everything in the database. It's here to support integration testing of migrations. Using it outside of testing will probably cause data loss.
func (*Postgres) DestructiveMigrateForTests ¶
DestructiveMigrateForTests clears the database then forcibly runs the migrations twice. This is important to test because our db tooling will retry schema migrations in face of connection errors, etc.; the retry can only succeed if the schem migrations are written in idempotent style.
Click to show internal directories.
Click to hide internal directories.