Fix for DateTime and datetime usage to the same format#347
Merged
ddon merged 4 commits intoBeamLabEU:devfrom Feb 17, 2026
Merged
Fix for DateTime and datetime usage to the same format#347ddon merged 4 commits intoBeamLabEU:devfrom
ddon merged 4 commits intoBeamLabEU:devfrom
Conversation
V58 converts all timestamp columns across 68 tables from timestamp to timestamptz, completing the DateTime standardization. Also fixes uuid_fk_columns to backfill NULL UUIDs before applying NOT NULL constraints, handling orphaned integer FK references. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
Replace :utc_datetime_usec with :utc_datetime and NaiveDateTime with DateTime across all 73 schema and context files. This prevents the class of bugs caused by mixing naive/aware datetime types and aligns Elixir schemas with the V58 PostgreSQL timestamptz migration. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
Add two new subsections to Code Style Guidelines: "Structs Over Plain Maps" documenting the preference for struct types over bare maps in application code (with config/config.exs exception), and "DateTime: Always Use DateTime.utc_now()" as a quick-reference cross-link to the full DateTime Convention section. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
timujinne
added a commit
to timujinne/phoenix_kit
that referenced
this pull request
Feb 18, 2026
PR BeamLabEU#347 changed all schema fields from :utc_datetime_usec to :utc_datetime but did not add DateTime.truncate(:second) to all DateTime.utc_now() calls in contexts and schemas. This caused ArgumentError crashes on any DB write operation. Fixed 19 files across settings, billing, shop, emails, referrals, tickets, comments, scheduled jobs, auth, permissions, and roles.
4 tasks
ddon
pushed a commit
that referenced
this pull request
Feb 18, 2026
ddon
pushed a commit
that referenced
this pull request
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.