postgres_migrator
hn-search
postgres_migrator | hn-search | |
---|---|---|
7 | 1,673 | |
85 | 525 | |
- | 0.2% | |
5.1 | 2.9 | |
5 months ago | 7 months ago | |
Rust | TypeScript | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
postgres_migrator
-
We built our customer data warehouse all on Postgres
Thanks! Yeah definitely agree that building out declarative table management for Postgres would be a major effort. A few open source projects I've seen in that area include:
https://github.com/sqldef/sqldef (Go)
https://github.com/bikeshedder/tusker (Python but being ported to Rust)
https://github.com/tyrchen/renovate (Rust)
https://github.com/blainehansen/postgres_migrator (Rust)
Some of these are based on parsing SQL, and others are based on running the CREATEs in a temporary location and introspecting the result.
The schema export side can be especially tricky for Postgres, since it lacks a built-in equivalent to MySQL's SHOW CREATE TABLE. So most of these declarative pg tools shell out to pg_dump, or require the user to do so. But sqldef actually implements CREATE TABLE dumping in pure Golang if I recall correctly, which is pretty cool.
There's also the question of implementing the table diff logic from scratch, vs shelling out to another tool or using a library. For the latter path, there's a nice blog post from Supabase about how they evaluated the various options: https://supabase.com/blog/supabase-cli#choosing-the-best-dif...
-
Pgroll: zero-downtime, undoable, schema migrations for Postgres
Forr postgres, how does the schema diffing aspect compare to migra?
https://github.com/djrobstep/migra
I'm asking because, although migra is excellent and there are multiple migrations tools based on it (at least https://github.com/bikeshedder/tusker and https://github.com/blainehansen/postgres_migrator), issues are piling up but development seem to be slowing down
-
Diesel 2.1
Is this similar to migra? There's a tool written in Rust that calls it, postgres_migrator (there's also tusker)
-
Ask HN: ORM or Native SQL?
The best solution I've ever seen is this Rust library https://github.com/cornucopia-rs/cornucopia
You write plain SQL for you schema (just a schema.sql is enough) and plain SQL functions for your queries. Then it generates Rust types and Rust functions from from that. If you don't use Rust, maybe there's a library like that for your favorite language.
Optionally, pair it with https://github.com/bikeshedder/tusker or https://github.com/blainehansen/postgres_migrator (both are based off https://github.com/djrobstep/migra) to generate migrations by diffing your schema.sql files, and https://github.com/rust-db/refinery to perform those migrations.
Now, if you have simple crud needs, you should probably use https://postgrest.org/en/stable/ and not an ORM. There are packages like https://www.npmjs.com/package/@supabase/postgrest-js (for JS / typescript) and probably for other languages too.
If you insist on an ORM, the best of the bunch is prisma https://www.prisma.io/ - outside of the typescript/javascript ecosystem it has ports for some other languages (with varying degrees of completion), the one I know about is the Rust one https://prisma.brendonovich.dev/introduction
- migrator: automatically generate postgres migrations from a declarative raw sql schema
- migrator: automatically generate postgres migrations from a declarative raw sql schema, written in Rust
- Migrator: Automatically generate Postgres migrations from declarative SQL schema
hn-search
- Home-Cooked Software and Barefoot Developers
-
From Steampunk to Solarpunk (2008)
I first heard of Solarpunk from the Imaginary Worlds podcast:
https://www.imaginaryworldspodcast.org/episodes/solarpunk-th...
Which I prompted me to post the Wikipedia link 4 years ago, several others posted similar links prior to that, and others have posted interesting links hear too:
https://hn.algolia.com/?dateRange=all&page=3&prefix=false&qu...
-
Patrick Breyer and Pirate Party Lose EU Parliament Seats
I will deeply deeply having someone so well connected to such incredibly complex contemporary digital rights issues in a place of power. Patrick Breyer's work in advocating & sharing what's going on has been such an incredibly high form of service, has illuminated such a dark & scary part of governance, and it's hard to imagine who else in the world is going to step up & be the light in Patrick's absence.
Patrick, thank you for the many years of incredible service. Your writing online about what's happening is without peer. https://hn.algolia.com/?query=patrick%20breyer&sort=byDate
- FBI raids Cortland Management in Atl; DOJ rental/housing market probe
-
Ask HN: Who is hiring? (June 2024)
Anything this common becomes noise, since it doesn't add any new information.
Heres' another way to look at it: since the idea of HN is to be intellectually interesting (https://hn.algolia.com/?dateRange=all&page=0&prefix=true&sor...), repetition is the most important thing to avoid (https://hn.algolia.com/?dateRange=all&page=0&prefix=false&so...).
-
Hotwire: HTML Over The Wire
At least as far as Hacker News is concerned, I'd call htmx way more marketed. It has hundreds of HN submissions in the past year alone [0] including one that broke 1000 points, compared to Hotwire which is sitting at about 40 submissions in the past year [1], the most popular of which is this one.
[0] https://hn.algolia.com/?dateRange=pastYear&prefix=true&query...
[1] https://hn.algolia.com/?dateRange=pastYear&prefix=true&query...
-
Parable of the Sofa
See https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
-
Stealing everything you've ever typed on your Windows Recall PC is now possible
Authorities compel tech companies to hand over data and place backdoors. They typically abuse secrecy laws to avoid public backlash, but their public demands have gotten bolder since the Snowden disclosures.
https://www.reuters.com/technology/cybersecurity/governments...
https://www.techdirt.com/2016/02/16/no-judge-did-not-just-or...
https://www.bloomberg.com/news/features/2021-09-02/juniper-m...
https://www.theguardian.com/world/2013/jun/06/us-tech-giants...
https://www.reuters.com/article/idUSKCN1241YV/
http://www.techdirt.com/articles/20130614/02110223467/micros...
https://hn.algolia.com/?q=encryption%20ban
They even also do it without the companies' knowledge too.
https://archive.is/2023.10.31-203648/https://www.washingtonp...
https://www.eff.org/deeplinks/2015/11/its-no-secret-governme...
Have you been living under a rock this past decade?
-
The End of Software
This is some droll trash. And it's being reposted every couple hours. Frag this. https://hn.algolia.com/?query=The%20End%20of%20Software
- Go: Sentinel errors and errors.Is() slow your code down by 3000%
What are some alternatives?
refinery - Powerful SQL migration toolkit for Rust.
duckduckgo-locales - Translation files for <a href="https://duckduckgo.com"> </a>
pgroll - PostgreSQL zero-downtime migrations made easy
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
migra - Like diff but for PostgreSQL schemas
parser - 📜 Extract meaningful content from the chaos of a web page
quantumdb - Zero-downtime schema evolution for PostgreSQL
readability - A standalone version of the readability lib
safeql - Composable / async / functional / type-safe / parallel-pipelined queries and relations without SQL injection or N+1s.
yq - Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
tusker - PostgreSQL migration management tool
nitter - Alternative Twitter front-end