Question

My Replit AI agent rewrote the database schema without asking

Solved · 9 views · asked by kai_makes · edited

I asked for a new field on projects. It renamed three tables, changed ids from int to uuid, and deleted my test data.

What I’ve tried

Restored from a backup I luckily had. Scared to ask it anything schema-related now.

Comment

1 answer

Marked as helpful by the asker
ines_data · edited

Right to be scared. For anything touching the schema, run the agent in plan-only mode:

Propose the SQL for adding deadline to projects. Do not execute anything. Show me the statement and a rollback.

Then you run it yourself. Agents are great at writing SQL and terrible at knowing which SQL is irreversible. Keep that decision human.

Comment