question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to enable sync schema and not drop columns?

See original GitHub issue

Issue type:

[x] question [ ] bug report [ ] feature request [ ] documentation issue

Database system/driver:

[ ] cordova [ ] mongodb [x] mssql [ ] mysql / mariadb [ ] oracle [ ] postgres [ ] sqlite [ ] sqljs [ ] react-native

TypeORM version:

[x] latest [ ] @next [ ] 0.x.x (or put your version here)

When using SQL Server, I use a not supported column type: rowversion. I guess typeorm has no way to define this column type. So I have a SQL script add this type if they are not been added. But when initialize typeorm, this column will be dropped if set sync to true.

Is there an option about not drop columns but only add columns when initializing?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
apielcommented, Sep 30, 2018

Any chance to deactivate synchronization for a specific column?

3reactions
ArturoGamRodcommented, Nov 28, 2020

it is very easy to get this wrong and/or make a mistake. synchronization should not drop columns - especially with existing data - its a deal breaker guys.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Enable Sync Only for Columns that You Need - Fivetran
Assume we want to enable sync only for column column_3 . First of all, to exclude other unwanted columns you need to know...
Read more >
Option to NOT drop column in target table? - Redgate forums
1) Automatic check that production and master are in sync. · 2) Master is merged into feature branch to ensure there are no...
Read more >
Sync Schema (DDL) Changes - SymmetricDS
Run the data definition language (DDL) on the central database first. This should be done during a reasonably quiet period without contention.
Read more >
Database schema is not in sync for a nullable column
Which version of doctrine/dbal do you use? – xabbuh. Aug 15, 2018 at 8:04. doctrine.dbal ...
Read more >
Automate the replication of schema changes in SQL Data Sync
If you want to clean up the records in the schema change tracking table, use DELETE instead of TRUNCATE. Never reseed the identity...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found