Skip to content

Help please, Tables are not created in Cloudflare D1 when deploying #3288

Open
@agotfredsen82

Description

@agotfredsen82

Environment


  • Operating System: Darwin
  • Node Version: v22.14.0
  • Nuxt Version: 3.15.1
  • CLI Version: 3.23.1
  • Nitro Version: 2.11.8
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Version

3.4.0

Reproduction

nitro: {
preset: "cloudflare-pages",
},

hub: {
database: true,
},

content: {
database: {
type: 'd1',
binding: 'DB'
}
},

Description

I am using nitro preset Cloudflare Worker

D1 binding works fine BUT tables are never created for Nuxt / content In D1 . ? So I get a blank website

in log on Cloduflare Dashboard in D1 I see things like
SELECT * FROM _content_info WHERE id = ?
SELECT * FROM _content_content WHERE ("path" = '/portfolio/fullscreen')

but there are not any tables to get any data from , simply the tables are not created on deploy ?

only table I see is _hub_migration that seems to be able to create its tables on deploy
CREATE TABLE IF NOT EXISTS _hub_migrations ( id INTEGER PRIMARY KEY A etc etc

In my Github workflows I have

yarn build:web - > "build": "nuxt build",
npx wrangler pages deploy

I have tried for hours trying to get this working , help please

Additional context

No response

Logs

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