Skip to content

_hub_migrations table not created on dev/local env #340

@kido1611

Description

@kido1611

Describe the bug
Got an error no such table _hub_migrations when running npx nuxt dev

 ERROR  [nitro] [unhandledRejection] D1_ERROR: no such table: _hub_migrations: SQLITE_ERROR

  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  at applyMigrations (node_modules/.pnpm/@nuxthub+core@0.8.0_ioredis@5.4.1_magicast@0.3.5_rollup@4.24.0_vite@5.4.8_@types+node@22.7.5__mmi5pjmiqd25qwhgrgntsw64k4/node_modules/@nuxthub/core/dist/runtime/database/server/utils/migrations/migrations.js:7:30)
  at <anonymous> (node_modules/.pnpm/@nuxthub+core@0.8.0_ioredis@5.4.1_magicast@0.3.5_rollup@4.24.0_vite@5.4.8_@types+node@22.7.5__mmi5pjmiqd25qwhgrgntsw64k4/node_modules/@nuxthub/core/dist/runtime/database/server/plugins/migrations.dev.js:13:7)
  at async Promise.all (index 0)
  at <anonymous> (node_modules/.pnpm/@nuxthub+core@0.8.0_ioredis@5.4.1_magicast@0.3.5_rollup@4.24.0_vite@5.4.8_@types+node@22.7.5__mmi5pjmiqd25qwhgrgntsw64k4/node_modules/@nuxthub/core/dist/runtime/ready.dev.js:5:3)

Steps to reproduce

  1. Create nuxt app with latest version of nuxthub (0.8.0)
  2. Enable nuxthub database
  3. Create a sql migration
  4. Run npx nuxt dev / pnpm dev

Or using this repository: https://github.com/kido1611/nuxthub-error-auto-migrations

Expected behavior
_hub_migrations should be automatically created if not exist in local environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions