From a4b489032b9bb14a3637522aae89014b714494a4 Mon Sep 17 00:00:00 2001 From: Pavan Rikhi Date: Tue, 30 Apr 2024 12:01:12 -0400 Subject: [PATCH] Document the `!no-migrate` Entity Attribute (#1530) 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. --- persistent/Database/Persist/Quasi.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/persistent/Database/Persist/Quasi.hs b/persistent/Database/Persist/Quasi.hs index a245b8ff6..451f92229 100644 --- a/persistent/Database/Persist/Quasi.hs +++ b/persistent/Database/Persist/Quasi.hs @@ -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