Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgres scaffold not compatible with current persistent library #210

Open
schoettl opened this issue Oct 20, 2022 · 2 comments
Open

postgres scaffold not compatible with current persistent library #210

schoettl opened this issue Oct 20, 2022 · 2 comments

Comments

@schoettl
Copy link

The yesodweb/postgres scaffold doesn't compile with persistent >= 2.13.0.0 (since about mid of 2021).

They removed the function connEscapeTableName which is used in the scaffold, see ChangeLog.

I tried for an hour to get it going again but I failed. The problematic code is here:
https://github.com/yesodweb/yesod-scaffold/blob/postgres/test/TestImport.hs#L59

For now, I fall back to loading every *Spec module individually and only those that do without Yesod's TestImport.

@snoyberg
Copy link
Member

@parsonsmatt any recommendations on the easiest way to migrate the scaffold?

@parsonsmatt
Copy link

I think that getEscapedRawName ought to do it

-    let escapedTables = map (connEscapeName sqlBackend . DBName) tables
+    let escapedTables = map (getEscapedRawName sqlBackend) tables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants