Skip to content

Commit

Permalink
NEOS-1716: adds column removal strategy (#3147)
Browse files Browse the repository at this point in the history
  • Loading branch information
alishakawaguchi authored Jan 16, 2025
1 parent 12530ac commit a3c2a82
Show file tree
Hide file tree
Showing 25 changed files with 4,453 additions and 2,221 deletions.
3,995 changes: 2,298 additions & 1,697 deletions backend/gen/go/protos/mgmt/v1alpha1/job.pb.go

Large diffs are not rendered by default.

90 changes: 90 additions & 0 deletions backend/gen/go/protos/mgmt/v1alpha1/job.pb.json.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions backend/protos/mgmt/v1alpha1/job.proto
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ message PostgresSourceConnectionOptions {
bool subset_by_foreign_key_constraints = 4;
// Provide a strategy of what to do in the event Neosync encounters an unmapped column for the job's mapped tables.
NewColumnAdditionStrategy new_column_addition_strategy = 5;
// Provide a strategy of what to do in the event Neosync encounters a column that is removed from the source table.
ColumnRemovalStrategy column_removal_strategy = 6;

message NewColumnAdditionStrategy {
oneof strategy {
Expand All @@ -151,6 +153,21 @@ message PostgresSourceConnectionOptions {
// Configuration for the AutoMap strategy
message AutoMap {}
}

message ColumnRemovalStrategy {
oneof strategy {
// halt job if a column is removed
HaltJob halt_job = 1;

// continue job if a column is removed
ContinueJob continue_job = 2;
}
// Configuration for the HaltJob strategy
message HaltJob {}

// Configuration for the ContinueJob strategy
message ContinueJob {}
}
}

message PostgresSourceSchemaOption {
Expand All @@ -167,6 +184,24 @@ message MysqlSourceConnectionOptions {
repeated MysqlSourceSchemaOption schemas = 2;
string connection_id = 3 [(buf.validate.field).string.uuid = true];
bool subset_by_foreign_key_constraints = 4;

// Provide a strategy of what to do in the event Neosync encounters a column that is removed from the source table.
ColumnRemovalStrategy column_removal_strategy = 5;

message ColumnRemovalStrategy {
oneof strategy {
// halt job if a column is removed
HaltJob halt_job = 1;

// continue job if a column is removed
ContinueJob continue_job = 2;
}
// Configuration for the HaltJob strategy
message HaltJob {}

// Configuration for the ContinueJob strategy
message ContinueJob {}
}
}

message MysqlSourceSchemaOption {
Expand All @@ -183,6 +218,23 @@ message MssqlSourceConnectionOptions {
repeated MssqlSourceSchemaOption schemas = 2;
string connection_id = 3 [(buf.validate.field).string.uuid = true];
bool subset_by_foreign_key_constraints = 4;
// Provide a strategy of what to do in the event Neosync encounters a column that is removed from the source table.
ColumnRemovalStrategy column_removal_strategy = 5;

message ColumnRemovalStrategy {
oneof strategy {
// halt job if a column is removed
HaltJob halt_job = 1;

// continue job if a column is removed
ContinueJob continue_job = 2;
}
// Configuration for the HaltJob strategy
message HaltJob {}

// Configuration for the ContinueJob strategy
message ContinueJob {}
}
}

message MssqlSourceSchemaOption {
Expand Down
Loading

0 comments on commit a3c2a82

Please sign in to comment.