Skip to content

Commit d182f99

Browse files
committed
Add _meta column to greenlight_pr_state
- Add sql/003 migration adding `_meta Tuple(bucket, key)` to misc.greenlight_pr_state via ALTER TABLE ... ADD COLUMN IF NOT EXISTS - Position `_meta` after `version` so it is the last ordinary column, before the MATERIALIZED `_inserted_at` Notes: The clickhouse-replicator-s3 ingestion path (general_adapter) inserts positionally with `SELECT *, (bucket, key) AS _meta`, so the S3 provenance tuple must be the trailing ordinary column for positional alignment to hold. Applied manually to the live table (clee2000/huydhn); there is no automated migration runner. Signed-off-by: Jean Schmidt <contato@jschmidt.me>
1 parent 6eb010b commit d182f99

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- Add the S3 provenance column the clickhouse-replicator-s3 ingestion path needs:
2+
-- general_adapter inserts positionally (`SELECT *, (bucket, key) AS _meta`), so
3+
-- `_meta` must be the last ordinary column, before the MATERIALIZED `_inserted_at`.
4+
-- Applied manually to the live table by clee2000/huydhn (no automated migration).
5+
ALTER TABLE misc.greenlight_pr_state
6+
ADD COLUMN IF NOT EXISTS `_meta` Tuple(bucket String, key String) AFTER `version`

0 commit comments

Comments
 (0)