Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: "no persistent term stored with this key: UUIDv7.Clock" #8

Closed
pmarreck opened this issue May 9, 2024 · 2 comments
Closed

error: "no persistent term stored with this key: UUIDv7.Clock" #8

pmarreck opened this issue May 9, 2024 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@pmarreck
Copy link

pmarreck commented May 9, 2024

Did I forget to add a config? (or is there one missing from the docs?)

** (ArgumentError) errors were found at the given arguments:

  * 1st argument: no persistent term stored with this key

    :persistent_term.get(UUIDv7.Clock)
    (uuid_v7 0.5.0) lib/clock.ex:23: UUIDv7.Clock.next/1
    (uuid_v7 0.5.0) lib/uuidv7.ex:61: UUIDv7.bingenerate/0
    (uuid_v7 0.5.0) lib/uuidv7.ex:45: UUIDv7.generate/0
    (ecto 3.10.3) lib/ecto/repo/schema.ex:974: anonymous fn/2 in Ecto.Repo.Schema.autogenerate_changes/3
    (elixir 1.16.2) lib/enum.ex:4326: Enum.flat_map_list/2
    (ecto 3.10.3) lib/ecto/repo/schema.ex:364: anonymous fn/15 in Ecto.Repo.Schema.do_insert/4
    (ecto 3.10.3) lib/ecto/repo/schema.ex:273: Ecto.Repo.Schema.insert!/4
@ryanwinchester
Copy link
Owner

ryanwinchester commented May 9, 2024

Thanks for that, it's a good catch. It's missing from docs.

Can you try adding this to your config/config.exs?

config :app, App.Repo, start_apps_before_migration: [:uuid_v7]

@ryanwinchester ryanwinchester self-assigned this May 9, 2024
@ryanwinchester ryanwinchester added the documentation Improvements or additions to documentation label May 9, 2024
@pmarreck
Copy link
Author

pmarreck commented May 9, 2024

That fixed it! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants