killercup / killercup/scribbles

What about migrations?

Open
#55 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
68
Forks
11
PR merge metrics
No merged PRs in 30d

Description

I stumbled on your post while researching how to use postgres views with diesel. I had seen this workaround before but this articled helped solidify some things I was thinking about.

What it does not mention though is that if you manager your schema with migrations, Diesel will leave you in the cold, because it only prints-schemas with tables and such... Views will go missing every time diesel regenerates your schema file.

A way to fix that is to use the patch_file config in the diesel.toml... If you create a patch file from the diff of your view in the schema.rs file, it will apply the patch AFTER it generates the schema and you have your views remaining in the schema.rs.

Hopefully this helps someone

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue describes a Diesel migration and schema-generation workaround but names no documentation file, test, or concrete change. Start by locating the referenced post and its source, then determine where migration-related guidance belongs. Done would require an agreed documentation target and clear coverage of the reported views behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres
Domain
databases, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.