A "foreign key" index ;) of databases; their nature, modern players in the open source + closed markets, 2026-era distributed/hyperscaling systems design principles, memes, complaints, and the solution to NEON/DRIZZLEKIT NOT DOING ENUMS WITH DRIZZLE KIT MIGRATE FOR SOME FUCKING REASON WHICH HAS BEEN THE SOURCE OF SO MUCH IRRITATION smh my head
Find a file
2026-09-25 01:12:48 -07:00
README.md add initial aman artisinal hand-typed markdown in README.md! this should be sufficient for the codex/aodex swarms to go forth... 2026-09-25 01:12:48 -07:00

fk_databases

How has it been ~50 years(?) since the invention of relational databases (SQL and the like) and drizzle kit migrate still doesn't work on the great "serverless branching seamless ez mode saas slop NEON DB"????

I payed good money for this b2b saas slop.

And what did I get for my troubles?

Thousands of agentic engineering superorganism hours sank into database migration nonsense.

"Ah yes let me manually --force push the latest https://openlens.com release."

"We are just trying to make sure humanity is victorious over the machine in the singularity,"

"For sure mang we have infinity runway even if we don't get our shit together"

"Nws bossman"


Nah

In this repo, me n the codex agents (hello agents! this parts is ur instruction set for the autoresearch swarm u r gonna be in/running/ensuring the success of <3)

Fuccalldat noise about 'no clean db migrate if u use enums'.

Let me have my enums and my migrates.

Call me greedy.

I don't care.

| GOAL: We are going to figure out wtf is the optimal way to run/build out goated prod openlens postgres db fr fr if we r gonna basically be storing the entire internet and then some in there!!!

sure, git for scrape space^{TM} is gonna carry lots of the version control (light work) for scrapes of the ~entire internet every 4 hours;

the database stores commit hashes to reference various points on the main timeline of git for scrapespace spacetime^{TM} (patent pending!) as well as alternate realities (i.e. counterfactual/hypothetical updates to the public internet made now or in the future, caught in 4k, referenceable and back-testable for the rest of time such that we might Jim Simons it up in this new-fangled AI search attention market).

this is hand-written human CoT. everyone wants artisinal markdown these days, or they won't read it. "it's ai slop" oh my god just use your ai to unslopify it if it peeves u so much dude get off my ass...

even though git for scrape space is goated, the production openlens db is lifting some heavy ahh weights and is gonna have to carry the boats, be reliable, not stab us in the back every time we do a goddamned db schema update or anything.

We are adults not and we are trying to make big boy money so we don't run out of money.

You see, we "only" raised so much money back in march 2025, and the thing is, if we don't make enough money, we lose the game and have to find real jobs again :(

The upshot: we are gonna win the game bc we are goated and we are more than capable of building a real shit data engineering type distributed wizard-level system to mog the competition bc we are real shit engineers and scientists and applied math enthusiasts, and we are in fact about that life.

Including our relational db.

Framing: Requirements Model for Relational DB

OpenLens prod db gotta be hella goated.

Key objectives:

  1. max reliable: a good database system needs to not randomly shit itself.
  2. max load-bearing (claudeism): i literally mean this db gotta carry some heavy ass boats. hella requests. hella pg_vector locks going off and y'know bajillions of workers and queues and statuses being read, written, hot swapped, and read from long-forgotten caches along with rapidly growing + writing dbs. the openlens prod db will eat that shit for lunch. bc we gotta essentially model the entire goddamned internet and by extension we gotta essentially model the entire goddamned world which is somewhat of an ambitious specification if you ask me but hey don't hate the game; hate the player. or something. a) no sweating about autoscaling limits: i don't want my worker pool for some small scale beta testing on the MPC to crash my server and exhaust some fuckass active connection pool limit. we are running a serious enterprise. can we not pay or otherwise communicate our seriousness to get this shit fixed? at the very least I am certain we can just do it ourselves if we must allocate the time but seriously i wanna sleep well at night ffs.
  3. not a literal scam: listen mang i know this shit runs on computers and if i'm sufficiently clever and responsible and unemployed i could write this shit from scratch and figure it out the long way but i got a lot of shit to do here and i wanna use a system that's not a scam. a) open source kinda goated ngl and relational dbs old as hell so you know some guys have been doing this shi and dealing with this shi and fixing it fr fr b) if execution environment is closed source/obscured/controlled-observed by other entities: should have mobility + healthy competition between providers pushing the bounds of technology using y'know normal capitalist market forces in a reasonable equilibrium that doesn't fuckin suck. c) big picture i just want my money's worth and i wanna max out mang this is the time to make something actually good -- not time for laziness; must consume entire internet to ensure human controllability/observability over AI-internet-singularity post-26.

I hope you understand that we are not messing around here.

Things are serious and somehow our prod db can't handle our enums and needs us to wipe its ass every time we do anything.

And our dev env and staging env db branches (of the STAGING ENVS WHICH ARE TINY COMPARED TO PROD BUT STILL DESERVE OUR BEST TECH FOR RUNNING + TESTING) shit themselves all the time.

U try to demo the shit and your dev instance db is like 'lemme cold start on your ahh' like brother how hard is it to respond to fucking sql requests over a nice network and a nice site and nice people doing serious work with like reasonable budget.

the shit runs on computers.

i have seen them.

i will do it myself if i must.

Directive #1 to agents (20260925 1am)

OK agents, so we are getting started on this somewhat involved journey to sort this nonsense out once and for all. As you can see if you are running in the contributor agent environment: this dir is within the proj_OpenLens dir and you will also find the literal openlens codebase here.

So that's gonna be pretty helpful to understand everything going on.

You will also see if you open your eyes a bit and shoot off some ray traces to see a lil (i.e. subagents bc shit is humungous fr): the amanos harness contains lots of great resources on openlens and its members (humans and agents alike :) )

So go forth. If you're the main thread, u should y'know set up the repo in order to actualize a really really high quality wikipedia++ type wiki.

Because we are being ironic and shi we are gonna follow a techno-brutalist design constraint for the site (shared team-wide) which will be a new wiki titled 'aoldb' -- aman's openlens db wiki basically.

it's gonna contain lots of raw materials scraped from the web by your subagents (hello subagents if you are reading this, hope you do great work!).

this contingent of your subagents must retrieve source of truth webpages on the fundamentals of databases.

you will want to heavily draw from input/csc343_notion_export_copy/ -- an export of my databases course notes.

pretty hand-wavy on the modern tooling but solid on fundamentals of relational dbs.

of course you should use your entire subagent fleet optimally to achieve victory: a hyper-optimal, trustable, reliable wiki/design document with the key information required to make the optimal engineering design selection for relational database technology.

ok, it's now 11 minutes past the hour. time to go forth and conquer with your legions :)

remember: tokens are no issue for us.

time is.

tempus fugit.