0

为了更有效地管理列更新,cockroach db 具有家族特性:https ://www.cockroachlabs.com/docs/stable/column-families.html

CREATE TABLE test (
    id INT PRIMARY KEY,
    last_accessed TIMESTAMP,
    data BYTES,
    FAMILY f1 (id, last_accessed),
    FAMILY f2 (data)
);

是否有任何描述 liquibase 脚本来创建具有两个或多个家族的表?

就像是

changes:
  - createTable:
      tableName: test
      columns:
        - column:
            constraints:
              primaryKey: true
              primaryKeyName: pk_id
            name: id
            type: INT
        - column:
            name: last_accessed 
            type: TIMESTAMP
        - column:
            name: data
            type: bytes
# not real liquibase yaml just question
      families:
        - family:
            name: f1
            columns:
            - id
            - last_accessed
        - family:
            name: f2
            columns:
            - data 

            
4

1 回答 1

0

您可以简单地使用SQL 变更集SQL 变更类型

于 2021-09-07T14:46:42.607 回答