drizzle-team / drizzle-team/drizzle-orm

error: cannot drop sequence drizzle.__drizzle_migrations_id_seq because other objects depend on it

Open
#3,320 38 comments 14 reactions 0 assignees View on GitHub
bug bug/fixed-in-beta db/postgres drizzle/kit priority
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

```log
[✓] Pulling schema from database...

Warning You are about to execute current statements:

DROP SEQUENCE "drizzle"."__drizzle_migrations_id_seq";

error: cannot drop sequence drizzle.__drizzle_migrations_id_seq because other objects depend on it
at .../node_modules/drizzle-kit/bin.cjs:79476:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.query (.../node_modules/drizzle-kit/bin.cjs:121418:26)
at async pgPush (.../node_modules/drizzle-kit/bin.cjs:124361:13)
at async _Command. (.../node_modules/drizzle-kit/bin.cjs:131618:7) {
length: 343,
severity: 'ERROR',
code: '2BP01',
detail: 'default value for column id of table drizzle.__drizzle_migrations depends on sequence drizzle.__drizzle_migrations_id_seq',
hint: 'Use DROP ... CASCADE to drop the dependent objects too.',
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'dependency.c',
line: '1202',
routine: 'reportDependentObjects'
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.