Skip to content

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

@JohnCido

Description

@JohnCido
[✓] 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.<anonymous> (.../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'
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions