mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-19 16:15:07 +00:00
In order to correctly restore schema from `DESC SCHEMA WITH INTERNALS`, we need a way to drop a column with a timestamp in the past. Example: - table t(a int pk, b int) - insert some data1 - drop column b - add column b int - insert some data2 If the sstables weren't compacted, after restoring the schema from description: - we will loss column b in data2 if we simply do `ALTER TABLE t DROP b` and `ALTER TABLE t ADD b int` - we will resurrect column b in data1 if we skip dropping and re-adding the column Test for this: https://github.com/scylladb/scylla-dtest/pull/4122 Fixes #16482 Closes scylladb/scylladb#18115 * github.com:scylladb/scylladb: docs/cql: update ALTER TABLE docs test/cqlpytest: add test for prepared `ALTER TABLE ... DROP ... USING TIMESTAMP ?` test/cql-pytest: remove `xfail` from alter table with timestamp tests cql3/statements: extend `ALTER TABLE ... DROP` to allow specifying timestamp of column drop cql3/statements: pass `query_options` to `prepare_schema_mutations()` cql3/statements: add bound terms to alter table statement cql3/statements: split alter_table_statement into raw and prepared schema: allow to specify timestamp of dropped column