artie-labs / transfer

Database replication platform that leverages change data capture. Stream production data from databases to your data warehouse (Snowflake, BigQuery, Redshift, Databricks) in real-time.
https://artie.com
Other
601 stars 29 forks source link

[DDL] Refactor adding and dropping columns #1052

Closed Tang8330 closed 3 days ago

Tang8330 commented 5 days ago

Changes

  1. Adding two functions BuildAddColumnQuery and BuildDropColumnQuery
  2. Creating a file called ddl.go

Once this is merged, the eventual goals are:

  1. Remove the need to have constants.ColumnOperation
  2. Remove buildAlterColumnQuery
  3. Move all DDL related functions to ddl.go
  4. Get rid of IsColumnAlreadyExistsErr()