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

Rename typeorm metadata table #7473

Merged
merged 3 commits into from
Oct 7, 2024
Merged

Rename typeorm metadata table #7473

merged 3 commits into from
Oct 7, 2024

Conversation

ijreilly
Copy link
Collaborator

@ijreilly ijreilly commented Oct 7, 2024

Fixes #7453

Copy link
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

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

LGTM!

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

This pull request renames the TypeORM metadata table to '_typeorm_generated_columns_and_materialized_views' and introduces a new migration to create this table, addressing issue #7453 which requested dropping the 'typeorm_metadata' table and handling generated columns differently.

  • Modified core.datasource.ts to include 'metadataTableName' option in TypeORM configuration
  • Added new migration file 1728314605995-add_typeormGeneratedColumnsAndMaterializedViews.ts to create the renamed metadata table
  • Removed old migration file 1726848397026-addTypeOrmMetadata.ts
  • Updated typeorm.service.ts to use the new metadata table name in DataSource configuration

4 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
CREATE TABLE "core"."_typeorm_generated_columns_and_materialized_views" (
"type" character varying NOT NULL,
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Define specific character varying length for 'type' column

@Weiko Weiko merged commit 491fe80 into main Oct 7, 2024
8 checks passed
@Weiko Weiko deleted the rename-typeorm-metadata-table branch October 7, 2024 16:25
harshit078 pushed a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
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.

Drop typeorm_metadata / generated columns
2 participants