Skip to content

Conversation

@maximepvrt
Copy link
Contributor

This PR addresses two separate improvements:

  1. Fix SQL syntax error introduced by https://github.com/nuxt/content/pull/3673/changes
 ERROR  [unhandledRejection] near "20": syntax error                  14:55:45

    at Database.exec (node_modules/.pnpm/better-sqlite3@12.6.0/node_modules/better-sqlite3/lib/methods/wrappers.js:9:14)
    at Object.exec (node_modules/.pnpm/db0@0.3.4_@electric-sql+pglite@0.3.15_@libsql+client@0.17.0_encoding@0.1.13__better-sql_71033862cb6d26be682bfee7871b05d1/node_modules/db0/dist/connectors/better-sqlite3.mjs:24:26)
    at Object.exec (src/utils/database.ts:156:10)
    at processCollectionItems (src/module.ts:423:10)
    at async src/module.ts:252:20
    at async initNuxt (node_modules/.pnpm/nuxt@4.2.2_91645c95ed588071e154b0779b0d0c3a/node_modules/nuxt/dist/index.mjs:5390:3)
    at async #initializeNuxt (node_modules/.pnpm/@nuxt+cli@3.32.0_cac@6.7.14_magicast@0.5.1/node_modules/@nuxt/cli/dist/dev-KB30iboK.mjs:492:3)
    at async NuxtDevServer.init (node_modules/.pnpm/@nuxt+cli@3.32.0_cac@6.7.14_magicast@0.5.1/node_modules/@nuxt/cli/dist/dev-KB30iboK.mjs:384:3)
    at async initialize (node_modules/.pnpm/@nuxt+cli@3.32.0_cac@6.7.14_magicast@0.5.1/node_modules/@nuxt/cli/dist/dev-KB30iboK.mjs:685:2)
    at async Object.run (node_modules/.pnpm/@nuxt+cli@3.32.0_cac@6.7.14_magicast@0.5.1/node_modules/@nuxt/cli/dist/dev-CsAvgRwH.mjs:205:51)
  1. Standardize date/datetime formats

    • Dates are now stored as YYYY-MM-DD
    • Datetimes are now stored as YYYY-MM-DD HH:mm:ss

These are the default storage formats for dates in databases, ensuring consistent behavior across queries.

@vercel
Copy link

vercel bot commented Jan 24, 2026

@maximepvrt is attempting to deploy a commit to the Nuxt Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

📝 Walkthrough

Walkthrough

Three files were modified to add new schema fields and refactor date/datetime formatting logic. The people collection schema now includes birthday (date) and lastloginat (datetime) fields. Date and datetime formatting logic was updated in two runtime files to explicitly distinguish between 'date' format (YYYY-MM-DD) and 'datetime' format (YYYY-MM-DD HH:MM:SS with space separator), replacing a previous combined conditional that could inadvertently match 'data' strings.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the two main improvements: fixing a syntax error with datetime fields and standardizing date/datetime formats, which align with the changes in the changeset.
Description check ✅ Passed The description is directly related to the changeset, explaining the SQL syntax error fix and the date/datetime format standardization with specific examples and error context.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@maximepvrt maximepvrt marked this pull request as draft January 24, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant