Skip to content

Fix for DateTime and datetime usage to the same format#347

Merged
ddon merged 4 commits intoBeamLabEU:devfrom
alexdont:dev
Feb 17, 2026
Merged

Fix for DateTime and datetime usage to the same format#347
ddon merged 4 commits intoBeamLabEU:devfrom
alexdont:dev

Conversation

@alexdont
Copy link
Contributor

No description provided.

Alexander Don and others added 4 commits February 18, 2026 00:35
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>
@ddon ddon merged commit cdb5084 into BeamLabEU:dev Feb 17, 2026
6 checks passed
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.
ddon pushed a commit that referenced this pull request Feb 18, 2026
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.

2 participants

Comments