Schema modifications
In TimescaleDB 2.1 and later, you can modify the table definition for hypertables with compressed chunks by adding nullable columns, and renaming existing columns.
Add nullable columns
To add a nullable column:
ALTER TABLE <hypertable> ADD COLUMN <column_name> <datatype>;
Note that adding constraints to the new column is not supported.
For example:
ALTER TABLE conditions ADD COLUMN device_id integer;
Rename columns
To rename a column:
ALTER TABLE <hypertable> RENAME <column_name> TO <new_name>;
For example:
ALTER TABLE conditions RENAME device_id TO devid;
当前内容版权归 TimescaleDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 TimescaleDB .