tursodatabase / turso-cli

Command line interface to Turso.

Home Page:https://turso.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI suggests running 'db replicate' to fix a partially create database

penberg opened this issue · comments

If you, for example, cancel turso db create command before it managed to spawn an instance, you will end up with a database that you cannot connect to. Some of the commands suggest running db replicate to remedy the situation, but this is confusing. Let's do a db doctor, db create --fix or similar command instead to make it explicit that you're repairing a broken database.

commented

Let's not show broken databases to users instead.

When they list databases, let's hide the ones without instances.
When they create one that exists but has no instances, we just create the instance in the existing app.

Then we fix the problem on our side, instead of giving this responsibility to the user.

If we choose not to list broken databases, we'd have to make sure that a broken database doesn't count against the quota (or they can destroy the broken database manually), otherwise a user could find themselves into a situation where they are stuck with no way of moving forward on their own, and no way to even observe or diagnose the problem.