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

Generate Migration on Postgres JSONB Column with Default Value Not Working #9681

Open
1 of 18 tasks
krushalit opened this issue Jan 5, 2023 · 1 comment
Open
1 of 18 tasks

Comments

@krushalit
Copy link

Issue description

Generate Migration on Postgres JSONB Column with Default Value Not Working

Expected Behavior

I do not expect the column change to show up in migration once I have generated it

Actual Behavior

Each time the column comes up with the necessary changes in every single migration

Steps to reproduce

I use postgres. I have a column in a table of type jsonb. It is not null and as a default value '{}'::jsonb. The table exists with with non null and default value. Yet, every time I run the migration, this column shows up suggesting changing it to not null and with this default value

My Environment

Dependency Version
Operating System Linux
Node.js version 18.12.1
Typescript version Not getting used
TypeORM version 0.3.11

Additional Context

No response

Relevant Database Driver(s)

  • aurora-mysql
  • aurora-postgres
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • spanner
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

Yes, I have the time, but I don't know how to start. I would need guidance.

@ahmetkucuk
Copy link

ahmetkucuk commented Aug 29, 2023

+1, Experiencing the same issue at version v0.2.45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants