Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions drizzle/0004_loose_wasp.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE "_prisma_migrations" CASCADE;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: CASCADE on DROP TABLE is safe but worth noting

The migration at drizzle/0004_loose_wasp.sql:1 uses DROP TABLE "_prisma_migrations" CASCADE. The CASCADE keyword will also drop any objects that depend on this table (e.g., views, foreign keys referencing it). Since _prisma_migrations is an internal Prisma bookkeeping table with no foreign key references from other tables (confirmed by inspecting the snapshot), CASCADE has no practical effect here beyond a simple DROP TABLE. It's not a bug, but in general, using CASCADE on production drops warrants a second look to ensure nothing unexpected is removed.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copilot AI Apr 4, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DROP TABLE "_prisma_migrations" CASCADE is more destructive than necessary here and can silently drop dependent objects (views, FKs, etc.) if they exist. Consider using DROP TABLE IF EXISTS "_prisma_migrations" (without CASCADE) so the migration is idempotent and fails loudly if something unexpectedly depends on the table.

Suggested change
DROP TABLE "_prisma_migrations" CASCADE;
DROP TABLE IF EXISTS "_prisma_migrations";

Copilot uses AI. Check for mistakes.
Loading