【问题标题】:How to use cockroachdb column families with liquidbase如何在 liquibase 中使用 cockroachdb 列族
【发布时间】:2021-08-11 14:21:47
【问题描述】:

为了更有效地管理列更新,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 

            

【问题讨论】:

    标签: liquibase cockroachdb column-family


    【解决方案1】:

    您可以简单地使用SQL changesetSQL change types

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-27
      • 2017-06-12
      • 2012-06-07
      • 2014-05-21
      • 2015-09-25
      • 1970-01-01
      相关资源
      最近更新 更多