-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support running with higher table versions in the database than in th…
…e code (#45)
- Loading branch information
Showing
6 changed files
with
67 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,29 @@ | ||
module Database.PostgreSQL.PQTypes.ExtrasOptions | ||
( ExtrasOptions(..) | ||
, defaultExtrasOptions | ||
, ObjectsValidationMode(..) | ||
) where | ||
|
||
data ExtrasOptions = | ||
ExtrasOptions | ||
{ eoForceCommit :: Bool | ||
-- ^ Force commit after every migration | ||
, eoEnforcePKs :: Bool | ||
{ eoCommitAfterEachMigration :: Bool | ||
-- ^ Run commit after every migration. | ||
, eoEnforcePKs :: Bool | ||
-- ^ Validate that every handled table has a primary key | ||
, eoObjectsValidationMode :: !ObjectsValidationMode | ||
-- ^ Validation mode for unknown tables and composite types. | ||
, eoAllowHigherTableVersions :: !Bool | ||
-- ^ Whether to allow tables in the database to have higher versions than | ||
-- the one in the code definition. | ||
} deriving Eq | ||
|
||
defaultExtrasOptions :: ExtrasOptions | ||
defaultExtrasOptions = ExtrasOptions | ||
{ eoForceCommit = False | ||
, eoEnforcePKs = False | ||
{ eoCommitAfterEachMigration = False | ||
, eoEnforcePKs = False | ||
, eoObjectsValidationMode = DontAllowUnknownObjects | ||
, eoAllowHigherTableVersions = False | ||
} | ||
|
||
data ObjectsValidationMode = AllowUnknownObjects | DontAllowUnknownObjects | ||
deriving Eq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters