From 25127fc805d040c9ff38f4cdf1f798adca684c12 Mon Sep 17 00:00:00 2001 From: patrick brisbin Date: Tue, 3 Jan 2023 13:39:00 -0500 Subject: [PATCH] Depends were never actually required It was listed in that `requiredFields` array, but was being defaulted to the empty string elsewhere. There is a test that confirms its optional, which makes sense anyway. --- src/Database/Schema/Migrations/Filesystem.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Database/Schema/Migrations/Filesystem.hs b/src/Database/Schema/Migrations/Filesystem.hs index b6c6238..2f1ac1d 100644 --- a/src/Database/Schema/Migrations/Filesystem.hs +++ b/src/Database/Schema/Migrations/Filesystem.hs @@ -113,7 +113,7 @@ data MigrationYaml = MigrationYaml , myDescription :: Maybe Text , myApply :: Text , myRevert :: Maybe Text - , myDepends :: Text + , myDepends :: Maybe Text -- ^ White-space separated names } deriving Generic @@ -139,7 +139,7 @@ migrationYamlToMigration theId my = Migration , mDesc = myDescription my , mApply = myApply my , mRevert = myRevert my - , mDeps = T.words $ myDepends my + , mDeps = maybe [] T.words $ myDepends my } newtype UTCTimeYaml = UTCTimeYaml