[MODEL] generated a migration that dropped a column without explicit instruction, on a live database.

Resolved 💬 2 comments Opened May 29, 2026 by adeelRana Closed Jul 9, 2026

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude made incorrect assumptions about my project

What You Asked Claude to Do

I Asked: to change the relation from "one to one" to "one to many"

What Claude Actually Did

generated a migration that dropped a column without explicit instruction, on a live database, with no data migration step confirmed first.

Expected Behavior

cluade should not add drop scripts for columns, tables or database with other tasks. unless claude was instructed to do so, Or claude could ask when it sees that task requires dropping.

Files Affected

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Haven't tried to reproduce

Steps to Reproduce

  1. Have an existing database with a column that holds live data (site_action.demolition_officer_id)
  2. Ask Claude to refactor the relationship — change a one-to-one FK to a many-to-many via a new join table
  3. Claude generates a Flyway migration that:
  • Creates the new tables ✓
  • Immediately issues ALTER TABLE site_action DROP COLUMN demolition_officer_id ✗
  • No data migration step before the drop
  • No warning to the user
  • No confirmation requested
  1. Migration runs, column is gone, existing data is lost

Claude Model

Sonnet

Relevant Conversation

Claude Sonnet 4.6

Impact

Critical - Data loss or corrupted project

Claude Code Version

● Claude Code 2.1.119

Platform

Anthropic API

Additional Context

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗