nucleuscloud / neosync

Open source data anonymization and synthetic data orchestration for developers. Create high fidelity synthetic data and sync it across your environments.
https://www.neosync.dev
MIT License
2.99k stars 106 forks source link

[NEOS-1398] Disable truncate and on conflict options in sql server #2594

Closed nickzelei closed 2 weeks ago

nickzelei commented 2 weeks ago

Truncate table is ineffective for any table with foreign key constraints.

The workaround is to do

DELETE FROM TABLENAME
DBCC CHECKIDENT ('DATABASENAME.dbo.TABLENAME', RESEED, 0)

But it can be really slow for large tables.

We may want to implement this anyways as it is our only viable workaround, but for now we will just disable and add support for later.

Mssql also does not support on conflict so we should disable it in the UI until we can offer something equivalent (if even possible)

From SyncLinear.com | NEOS-1398