updates - #37960
Conversation
kay-kim
commented
Jul 29, 2026
- incorporate legacy into the shortcode.
- clarify actions.
| --- | ||
| headless: true | ||
| --- | ||
| ### Schema changes (legacy source syntax) |
There was a problem hiding this comment.
this headless content is used in the create source legacy syntax and the ingest data/mysql/ landing page.
So ... broke into legacy schema and consideration body ... so that the
- the create source legacy page can remain the same
- the ingest data/mysql landing page can have just the non-schema consideration body along with the new shortcode.
Q: Do we want to include the shortcode in the sql create source/table (new + old) as well?
There was a problem hiding this comment.
I have another PR that I drafted (have to review because I've forgotten what I did there)
If you do the shortcode, it seems it would dovetail into my changes.
| - Dropping columns that were added after the source was created. These columns | ||
| are never ingested, so you can drop them without issue. | ||
|
|
||
| - Adding or removing `NOT NULL` constraints to tables that were nullable when |
There was a problem hiding this comment.
ditto with this file. Except removed this last bullet since this isn't true.
| via the `TEXT COLUMNS` option. Ingestion for that table stops, and you must | ||
| drop and recreate the table in Materialize to resume ingestion. | ||
| {{ else if eq $connector "mysql" -}} | ||
| Changing a column's data type to one that maps to a different Materialize type |
There was a problem hiding this comment.
heh heh ... had to reword ... AI thought it meant like if you had upstream varchar and that mapped to MZ text. It all thanked me for the clarification stating that it had understood it to mean that. I was thinking "Um... didn't you write it?" (but, it had then, "verified" something else in the code and concluded shenanigans ... so I had to fight that battle instead).
There was a problem hiding this comment.
whoops - yeah, the check is only skipped if someone used the explicit TEXT COLUMNS!
| */ -}} | ||
| {{- $connector := .Get "connector" -}} | ||
| {{- $is_postgres := eq $connector "postgres" -}} | ||
|
|
There was a problem hiding this comment.
@maheshwarip @martykulma - can you all review this page. I had to update and want to make sure I didn't go shenanigans.
There was a problem hiding this comment.
Awesome, thanks @kay-kim! I realized I had left out a reason for SQL Server to error - capture instance could get removed.
Also discovered that we have a bug in the code around SQL Server constraints. Would be nice to doc the correct/expected behavior today (which is that PRIMARY KEY and UNIQUE constraints being dropped for SQL Server will cause an error).
edit: actually, it turns out that if CDC was enabled when the PRIMARY KEY existed, SQL Server won't let you drop it.
| Materialize ignores the following constraint changes: foreign key, `CHECK`, | ||
| `UNIQUE`, and `PRIMARY KEY` constraints. As such, you can add or drop them | ||
| without affecting ingestion. |
There was a problem hiding this comment.
This turns out to be true for SQL Server today, but actually a bug. A constraint change for a table isn't logged in the ddl_history, so it goes unnoticed. 😬
I'm filing a bug that we will fix, but maybe we should doc that it will fail?
| via the `TEXT COLUMNS` option. Ingestion for that table stops, and you must | ||
| drop and recreate the table in Materialize to resume ingestion. | ||
| {{ else if eq $connector "mysql" -}} | ||
| Changing a column's data type to one that maps to a different Materialize type |
There was a problem hiding this comment.
whoops - yeah, the check is only skipped if someone used the explicit TEXT COLUMNS!
| state. Ingestion for that table stops, and you must drop and recreate the table | ||
| in Materialize to resume ingestion. | ||
|
|
||
| ### Table-level operations |
There was a problem hiding this comment.
For SQL Server, removing the capture instance Materialize is using (which is done via sys.sp_cdc_disable_table) will also cause a stall. SQL Server allows 2 capture instances to exist for a table, and removing the one MZ isn't using is OK.
|
Sounds good. What I'll do is:
|
a4f37aa
into
MaterializeInc:docs/upstream-schema-change-behavior