-
Notifications
You must be signed in to change notification settings - Fork 230
SYM-7015: DDL capture support for cross platform #431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/3.16
Are you sure you want to change the base?
Conversation
|
Please update your pull request title to the required format: RegEx Format Simplified explanation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of sending a create event rather than the exact DDL statement that ran on the source. Are there any plans to implement this for Postgres and Oracle, or is this issue just for SQL Server?
| @@ -449,8 +446,8 @@ public MsSqlTriggerTemplate(ISymmetricDialect symmetricDialect) { | |||
| " set @channelId = 'config'\n" + | |||
| " insert into " + defaultCatalog + "$(defaultSchema)$(prefixName)_data\n" + | |||
| " (table_name, event_type, trigger_hist_id, row_data, channel_id, source_node_id, create_time)\n" + | |||
| " values (@tableName, '" + DataEventType.SQL.getCode() + "', @histId,\n" + | |||
| " '\"delimiter " + delimiter + ";' + CHAR(13) + char(10) + replace(replace(@data.value('(/EVENT_INSTANCE/TSQLCommand/CommandText)[1]', 'nvarchar(max)'),'\\','\\\\'),'\"','\\\"') + '\",ddl',\n" + | |||
| " values (@tableName, '" + ddlEventType + "', @histId,\n" + | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when the captured DDL isn't for a specific table and @tableName is sym_node? It looks it it would end up sending a create event for sym_node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should document that this parameter is only compatible with SQL Server.
symmetric-io/src/main/java/org/jumpmind/symmetric/io/data/writer/DefaultDatabaseWriter.java
Show resolved
Hide resolved
|
Also, the issue in the tracker says that the target version is 3.17.0. Should this PR be for 3.17 instead? |
|




While capturing DDL changes on a source and sending to a target platform that is not the same as the target the DDL captured may not work on the target. This change would resend the table definition so that the target can create the appropriate alters to match the table definition sent from the source.