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

Fix deprecation warnings #248

Merged
merged 1 commit into from
Mar 8, 2025
Merged

Fix deprecation warnings #248

merged 1 commit into from
Mar 8, 2025

Conversation

dcramer
Copy link
Owner

@dcramer dcramer commented Mar 8, 2025

No description provided.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Updated index definitions across all schema files to align with modern Drizzle ORM standards, replacing object-return syntax with array-return syntax for improved consistency and removal of deprecation warnings.

  • Fixed incorrect region relationship in /apps/server/src/db/schema/entities.ts where countryId was used instead of regionId
  • Standardized table parameter naming to 'table' instead of entity names in index definitions
  • Removed unnecessary property names and object wrappers from index definitions
  • Simplified primary key definitions using new columns property syntax

💡 (3/5) Reply to the bot's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

19 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@dcramer dcramer enabled auto-merge (squash) March 8, 2025 00:07
Copy link

codecov bot commented Mar 8, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
528 1 527 0
View the top 1 failed test(s) by shortest run time
src/trpc/routes/countryCategoryList.test.ts > lists categories for a country by id
Stack Traces | 0.0914s run time
error: duplicate key value violates unique constraint "bottle_alias_name_idx"
 ❯ ../../node_modules/.pnpm/pg@8.13..../pg/lib/client.js:535:17
 ❯ .../lib/test/fixtures.ts:398:5NodePgSession.transaction ../../node_modules/.pnpm/drizzle-orm@0.39.3_@opentelemetry+api@1.9.0_@types+pg@8.11.6_pg@8.13..../src/node-postgres/session.ts:193:19Module.Bottle .../lib/test/fixtures.ts:320:10
 ❯ .../trpc/routes/countryCategoryList.test.ts:14:19

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { length: 243, severity: 'ERROR', code: '23505', detail: 'Key (lower(name::text))=(macallan 12-year-old) already exists.', hint: undefined, position: undefined, internalPosition: undefined, internalQuery: undefined, where: undefined, schema: 'public', table: 'bottle_alias', column: undefined, dataType: undefined, constraint: 'bottle_alias_name_idx', file: 'nbtinsert.c', line: '666', routine: '_bt_check_unique' }

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@dcramer dcramer disabled auto-merge March 8, 2025 00:09
@dcramer dcramer merged commit 3e11573 into main Mar 8, 2025
2 of 4 checks passed
@dcramer dcramer deleted the ref/fix-deprecations branch March 8, 2025 00:09
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.

1 participant