Skip to content

Commit

Permalink
Place the meta as the last value.
Browse files Browse the repository at this point in the history
  • Loading branch information
amitaibu committed Aug 26, 2024
1 parent 05fe2f2 commit 2dc6e5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ihp-ide/IHP/SchemaCompiler.hs
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,10 @@ compileDataTypePattern table@(CreateTable { name, inherits }) = tableNameToModel
|> filter (\(fieldName, _) -> fieldName /= "meta" && Text.toLower fieldName /= colName && fieldName /= "id")


-- Place the `meta` as the last value.
allDateFields = currentDataFields <> parentDataFields
|> filter (\(fieldName, _) -> fieldName /= "meta")
|> \fields -> fields <> [("meta", "MetaBag")]

compileTypePattern :: (?schema :: Schema) => CreateTable -> Text
compileTypePattern table@(CreateTable { name, inherits }) = tableNameToModelName name <> "' " <> dataTypeCompiled
Expand Down

0 comments on commit 2dc6e5d

Please sign in to comment.