Clerk migration guide uses wrong admin field and time unit #2430

Closed
opened 2026-03-13 09:53:37 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @tjx666 on GitHub (Dec 1, 2025).

Summary

  • The Clerk migration guide/script writes to the user record, but the admin plugin schema exposes (no "At"). The value is dropped/ignored.
  • from Clerk is seconds-from-now; the guide writes that raw number into a timestamp column without multiplying by 1000, so stored value is ~1970-01-01 or rejected.

Repro

  1. Follow https://www.better-auth.com/docs/guides/clerk-migration-guide#enable-email-and-password-optional and run the sample migration script (or its current version).
  2. Observe the user insert payload contains .
  3. With admin plugin enabled, the inserted row has null/ignored.
  4. If the insert is forced, the column receives a 1970 date because the value is a small integer in seconds.

Expected

Actual

  • Migration script uses and writes the raw seconds number; ban data is lost or invalid.

Suggestion

  • Update the guide/sample to use and convert seconds to milliseconds.

Environment: Better Auth docs as of 2025-12-01; admin plugin enabled; PostgreSQL schema aligns with the plugin docs.

Originally created by @tjx666 on GitHub (Dec 1, 2025). ## Summary - The Clerk migration guide/script writes to the user record, but the admin plugin schema exposes (no "At"). The value is dropped/ignored. - from Clerk is seconds-from-now; the guide writes that raw number into a timestamp column without multiplying by 1000, so stored value is ~1970-01-01 or rejected. ## Repro 1. Follow https://www.better-auth.com/docs/guides/clerk-migration-guide#enable-email-and-password-optional and run the sample migration script (or its current version). 2. Observe the user insert payload contains . 3. With admin plugin enabled, the inserted row has null/ignored. 4. If the insert is forced, the column receives a 1970 date because the value is a small integer in seconds. ## Expected - Field name should be to match the admin plugin schema (and docs: https://www.better-auth.com/docs/plugins/admin#schema). - Value should convert Clerk's seconds-from-now into a Date, e.g. . ## Actual - Migration script uses and writes the raw seconds number; ban data is lost or invalid. ## Suggestion - Update the guide/sample to use and convert seconds to milliseconds. Environment: Better Auth docs as of 2025-12-01; admin plugin enabled; PostgreSQL schema aligns with the plugin docs.
GiteaMirror added the documentation label 2026-03-13 09:53:37 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Dec 1, 2025):

Thanks for reporting this issue! It appears that the migration guide isn’t aligning with the admin plugin schema. We’ll update the guide/sample so that it writes to the correct field name (omitting the “At” suffix as defined in the admin plugin docs) and converts Clerk’s seconds-from-now value by multiplying by 1000 to produce a valid Date timestamp. In the meantime, please update your migration script accordingly so that the field matches the admin plugin’s schema and the timestamp conversion is handled properly.

Is there anything else you’d like to know about this migration or any other part of the integration? Tag @better-auth-agent if you would like an answer from the Agent.

If you need more help, tag @Skyvern in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Dec 1, 2025): Thanks for reporting this issue! It appears that the migration guide isn’t aligning with the admin plugin schema. We’ll update the guide/sample so that it writes to the correct field name (omitting the “At” suffix as defined in the admin plugin docs) and converts Clerk’s seconds-from-now value by multiplying by 1000 to produce a valid Date timestamp. In the meantime, please update your migration script accordingly so that the field matches the admin plugin’s schema and the timestamp conversion is handled properly. Is there anything else you’d like to know about this migration or any other part of the integration? Tag @better-auth-agent if you would like an answer from the Agent. _If you need more help, tag @Skyvern in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) • [Discord](https://discord.gg/fG2XXEuQX3) • [GitHub](https://github.com/Skyvern-AI/Skyvern) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/skyvern_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/fG2XXEuQX3) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/Skyvern-AI/Skyvern)
Author
Owner

@GautamBytes commented on GitHub (Dec 2, 2025):

@himself65 this issue can also be closed its a repeatition of this

@GautamBytes commented on GitHub (Dec 2, 2025): @himself65 this issue can also be closed its a repeatition of [this](https://github.com/better-auth/better-auth/issues/6442)
Author
Owner

@tjx666 commented on GitHub (Dec 2, 2025):

codex wrongly create duplicate issue

@tjx666 commented on GitHub (Dec 2, 2025): codex wrongly create duplicate issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2430