Skip to content

Update queries to use the new name of the record EDTF column#784

Merged
liam-lloyd merged 1 commit into
mainfrom
per-10426_update_record_edtf_column_name
Jun 17, 2026
Merged

Update queries to use the new name of the record EDTF column#784
liam-lloyd merged 1 commit into
mainfrom
per-10426_update_record_edtf_column_name

Conversation

@liam-lloyd

Copy link
Copy Markdown
Member

We are renaming record.originalfilecreationtime to record.displaytime, which better reflects its actual meaning. In light of that, this commit updates all stela queries that touch that column to use the new name.

We are renaming record.originalfilecreationtime to record.displaytime,
which better reflects its actual meaning. In light of that, this commit
updates all stela queries that touch that column to use the new name.
@liam-lloyd

Copy link
Copy Markdown
Member Author

This requires https://github.com/PermanentOrg/back-end/pull/888 (which is why the tests fail)

@slifty slifty requested a review from Copilot June 17, 2026 15:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Stela’s SQL queries and related tests/fixtures to reflect a database column rename on record from originalfilecreationtime to displaytime (EDTF “display time”), aligning the column name with its intended meaning.

Changes:

  • Updated record update/select SQL to reference record.displaytime instead of record.originalfilecreationtime.
  • Updated record-copy and record fixture SQL to insert/select displaytime.
  • Updated Jest tests in @stela/api and @stela/metadata_attacher to query/assert against displayTime/displaytime.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/metadata_attacher/src/queries/update_metadata.sql Updates the metadata attacher’s record UPDATE to set displaytime.
packages/metadata_attacher/src/index.test.ts Updates test query shape and assertions to use displayTime.
packages/api/src/record/queries/update_record.sql Renames the updated column in the record PATCH query to displaytime.
packages/api/src/record/queries/get_records.sql Renames selected column to record.displaytime AS "displayTime".
packages/api/src/record/queries/copy_record.sql Copies displaytime when duplicating a record.
packages/api/src/record/fixtures/create_complete_test_record.sql Updates test fixture insert column list to displaytime.
packages/api/src/record/controller/update_record.test.ts Updates test DB assertions to select/expect displaytime.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.56%. Comparing base (12f9f32) to head (1f9ce30).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #784   +/-   ##
=======================================
  Coverage   98.56%   98.56%           
=======================================
  Files         109      109           
  Lines        2778     2778           
  Branches      464      464           
=======================================
  Hits         2738     2738           
  Misses         36       36           
  Partials        4        4           
Flag Coverage Δ
api 98.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@liam-lloyd liam-lloyd merged commit 2d8aad1 into main Jun 17, 2026
48 of 50 checks passed
@liam-lloyd liam-lloyd deleted the per-10426_update_record_edtf_column_name branch June 17, 2026 16:34
@liam-lloyd liam-lloyd restored the per-10426_update_record_edtf_column_name branch June 22, 2026 22:11
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.

3 participants