Skip to content

TypeORM synchronize database even if it is up to date #10040

@juliengbt

Description

@juliengbt

Issue description

With synchronize set to true, typeorm tries to synchronize the database even if it is already up to date

Expected Behavior

When the database is up to date the schemaBuilder should return an empty array for the upQueries

Actual Behavior

The schema builder returns a bunch of queries

Steps to reproduce

https://github.com/juliengbt/typeorm_synchronize

My Environment

Dependency Version
Operating System MacOS
Node.js version 18.16.0
Typescript version 5.0.4
TypeORM version 0.3.16

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions