When a site's database is no longer in our account, juudd tells you which of two things happened. Either you took it with a hand-over link and it is yours now, or it was deleted and its data cannot be recovered from here. We can say which only because we keep a small record of our own. The database provider cannot tell the two apart.
That is the decision. The rest of this post is why the provider's answer is not enough, what the record holds and refuses to hold, and where the answer is still only a best reading.
The provider can say two words
Ask the provider about a database and the answer is one of two: still ours, or gone. From an account that no longer holds a database, a claimed one and a deleted one look identical. After a hand-over there is no read access, no copy and no grace period. After a deletion there is nothing either.
So "gone" is a state with two opposite meanings. One is the product working exactly as promised: you asked for the database and it left. The other is a customer's data lost with no way back. Reporting the second as the first is the worst answer this platform could give. Reporting the first as the second is a false alarm at the moment someone has done nothing wrong.
The record holds dates and no secret
The evidence that separates the two has to be kept somewhere that outlives the database. For each site we keep one small record: the provider's name, the database's id, and the dates things happened. When it was created. When a hand-over link was last minted. When the site's functions were first given a connection string. When one was written onto the site by hand.
It holds no connection string, no password and no role name. A connection string carries a password, and the only place we have to keep records sits beside what customers publish. Keeping the password there would make every later question about that store worse: who can read it, what a leaked key exposes, what a backup contains. The string is fetched from the provider when a tool call needs it and exists in memory for the length of that call.
There is a second reason for the shape. A record that never held the credential cannot be made to hand it over. That matters when the record is read by a tool that reports on the site rather than one that acts on it.
How the two halves combine
Neither half knows enough alone. The provider knows whether it still shows the database. The record knows whether a hand-over link was ever minted. The platform reads them together:
- Still shown by the provider: held by this platform.
- Gone, and a hand-over link was minted: it looks like the link was used, the database belongs to whoever opened it, and this platform has no access.
- Gone, and no link was ever minted: it left without a hand-over, which means it was deleted rather than claimed, and its data is not recoverable from here.
Three tools use that reading. database_status reports it. transfer_database refuses to mint a link for a database that is already out of our hands, and says so. And create_database does not quietly make a replacement: it names the old database, repeats the explanation, and says nothing was created. A second database nobody is watching, holding data the site is not reading, is the wrong answer to a customer who is already confused.
Two failure modes it is built around
A provider outage must never read as gone. Only a plain "not found" counts as an answer. Any other failure from the provider is an error, not a verdict. The failure being avoided is telling someone their database was taken or deleted when the provider simply had a bad minute.
The record is written before the tool answers. A database that exists at the provider and nowhere in our store is one nobody can find again. So create_database stores the record first, and calling it again for a site that already has a database returns the existing one instead of creating a second.
Where it is still a best reading
A minted link is evidence, not proof. The record says when a link was last made, not that anyone opened it, so the wording is "it looks like it was used".
A site can also be reading from a database this platform cannot see. If you wrote a connection string onto it by hand, database_status says so, with the date, and says the functions are probably reaching a different database from the one named. Nothing in the record knows which, and it cannot, without keeping the thing it exists not to keep. The answer it gives is to load the site and see whether it works.
The rule, once
When a database is gone, say which kind of gone: a record of dates, with no secret in it, read together with what the provider can see. A hand-over link is the exit door; deletion is not, and the two are never reported as the same thing. The tools and their limits are listed in the docs.