Skip to content

Commit

Permalink
Document the !no-migrate Entity Attribute (#1530)
Browse files Browse the repository at this point in the history
Add docs to the quasiquoter module about how the `!no-migrate` entity
attribute will prevent any migrations from being generated for it. This
is currently only "documented" in the source code.
  • Loading branch information
prikhi authored Apr 30, 2024
1 parent 9701360 commit a4b4890
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions persistent/Database/Persist/Quasi.hs
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,17 @@ userAttrs = do
-- [["sad"],["sogood"]]
@
== @!no-migrate@
To prevent @migrateModels@ from generating _any_ migrations for an entity, add
the @!no-migrate@ attribute to it's definition:
@
User !no-migrate
field String
good Dog
@
== @MigrationOnly@
Introduced with @persistent-template@ 1.2.0. The purpose of this attribute is
Expand Down

0 comments on commit a4b4890

Please sign in to comment.