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: postgres enum in schema regenerated migrations #8268

Conversation

helmsonsen
Copy link
Contributor

Description of change

added "/." to PostgresQueryRunner regex for default value retrieving to prevent regenerating migrations for enum columns with default type when the object is within a schema.

Previous Behaviour:
on any migration generation, a new migration has been created for enum default values when the object is within a named schema

Expected Behaviour:
no migration as long as the default value is not changed

A broader discussion around the issue: #3076 for which it extends the current workaround

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits follow conventions explained in CONTRIBUTING.md

@vovapilimon
Copy link

Добрый день! Когда эти правки будут доступны в мастере?

@zaro
Copy link
Contributor

zaro commented Nov 2, 2021

Is there any estimate for this, it's a blocker for updating to newer typeorm.

@pleerock
Copy link
Member

pleerock commented Nov 2, 2021

@helmsonsen can you please update issue description - explain a bit more how it currently behaves, why and how exactly proposed solution fixes the issue?

@AlexMesser AlexMesser merged commit 98d5f39 into typeorm:master Nov 13, 2021
HeartPattern pushed a commit to HeartPattern/typeorm that referenced this pull request Nov 29, 2021
…orm#8268)

Co-authored-by: Matthias Helmrich <helmsonsen@gmai.com>
HeartPattern pushed a commit to HeartPattern/typeorm that referenced this pull request Nov 29, 2021
…orm#8268)

Co-authored-by: Matthias Helmrich <helmsonsen@gmai.com>
@frostbytedata
Copy link

Did this commit truly fix the issue? I still get unnecessary migration queries added to my generated migrations with default enums. I am using TypeORM v0.3.6

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.

None yet

6 participants