Newtype used to avoid orphan instances for postgresql-simple classes.
Constructors
PunP :: PersistValue
:: a typeCtrl KGHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11
Modulepersistent-postgresql-2.14.3.0Haskell2010
Newtype used to avoid orphan instances for postgresql-simple classes.
PunP :: PersistValueRepresent Postgres interval using NominalDiffTime
Note that this type cannot be losslessly round tripped through PostgreSQL.
For example the value PgInterval 0.0000009 will truncate extra
precision. And the value PgInterval 9223372036854.775808 will overflow.
Use the Interval type if that is a problem for you.
Eq PgIntervalDefined in persistent-postgresql-2.14.3.0 · Database.Persist.Postgresql.InternalShow PgIntervalDefined in persistent-postgresql-2.14.3.0 · Database.Persist.Postgresql.InternalPersistField PgIntervalDefined in persistent-postgresql-2.14.3.0 · Database.Persist.Postgresql.InternalPersistFieldSql PgIntervalDefined in persistent-postgresql-2.14.3.0 · Database.Persist.Postgresql.InternalFromField PgIntervalDefined in persistent-postgresql-2.14.3.0 · Database.Persist.Postgresql.InternalToField PgIntervalDefined in persistent-postgresql-2.14.3.0 · Database.Persist.Postgresql.InternalGet the field parser corresponding to the given Oid.
For example, pass in the Oid of bool, and you will get back a field parser which parses boolean values in the table into PersistBools.
Represents a change to a Postgres DB in a statement.
Represents a change to a Postgres table in a DB statement.
Eq AlterTableDefined in persistent-postgresql-2.14.3.0 · Database.Persist.Postgresql.Internal.MigrationShow AlterTableDefined in persistent-postgresql-2.14.3.0 · Database.Persist.Postgresql.Internal.MigrationRepresents a change to a Postgres column in a DB statement.
Eq AlterColumnDefined in persistent-postgresql-2.14.3.0 · Database.Persist.Postgresql.Internal.MigrationShow AlterColumnDefined in persistent-postgresql-2.14.3.0 · Database.Persist.Postgresql.Internal.MigrationIndicates whether a Postgres Column is safe to drop.
Eq SafeToRemoveDefined in persistent-postgresql-2.14.3.0 · Database.Persist.Postgresql.Internal.MigrationShow SafeToRemoveDefined in persistent-postgresql-2.14.3.0 · Database.Persist.Postgresql.Internal.MigrationReturns a structured representation of all of the DB changes required to migrate the Entity from its current state in the database to the state described in Haskell.
Returns a structured representation of all of the DB changes required to migrate the listed entities from their current state in the database to the state described in Haskell. This function avoids N+1 queries, so if you have a lot of entities to migrate, it's much faster to use this rather than using migrateStructured in a loop.
Returns a structured representation of all of the DB changes required to migrate the Entity to the state described in Haskell, assuming it currently does not exist in the database.
Create a table if it doesn't exist.
findAlters :: [EntityDef]The list of all entity definitions that persistent is aware of.
-> EntityDefThe entity definition for the entity that we're working on.
-> ColumnThe column that we're searching for potential alterations for, derived from the Persistent EntityDef. That is: this is how we _want_ the column to look, and not necessarily how it actually looks in the database right now.
-> [Column]The columns for this table, as they currently exist in the database.
-> ([AlterColumn], [Column])Get the references to be added to a table for the given column.
Check if a column name is listed as the "safe to remove" in the entity list.