Skip to content

Conversation

@joshahicks
Copy link
Contributor

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.

@joshahicks joshahicks requested a review from a team as a code owner November 3, 2025 13:47
@joshahicks joshahicks self-assigned this Nov 3, 2025
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Please update your pull request title to the required format:

RegEx Format

^d{7}: .+$

Simplified explanation

{the 7 digit issue number}: {a short one line summary of the PR}

@joshahicks joshahicks changed the title Feature/ddl cross platform 0007015: DDL capture support for cross platform Nov 3, 2025
Copy link
Contributor

@evan-miller-jumpmind evan-miller-jumpmind left a 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" +
Copy link
Contributor

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.

Copy link
Contributor

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.

@evan-miller-jumpmind
Copy link
Contributor

Also, the issue in the tracker says that the target version is 3.17.0. Should this PR be for 3.17 instead?

@awebbdev1 awebbdev1 changed the title 0007015: DDL capture support for cross platform SYM-7015: DDL capture support for cross platform Nov 5, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 5, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
4.7% Duplication on New Code (required ≤ 3%)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants