Skip to content

index('idx_memories_metadata_type').on(sql((metadata->>'type'))), #28

Open
@jmikedupont2

Description

@jmikedupont2

index('idx_memories_metadata_type').on(sql((metadata->>'type'))), is not rendering properly

Source:
https://github.com/Imsharad/eliza-v2/blob/b3e850db09e793099efc567c4f0e84c4e0b11f06/packages/plugin-sql/src/schema/memory.ts#L66

Produces empty indexes :

table memories {
  id uuid [pk, not null]
  type text [not null]
  createdAt timestamptz [not null, default: `now()`]
  content jsonb [not null]
  entityId uuid
  agentId uuid
  roomId uuid
  unique boolean [not null, default: true]
  metadata jsonb [not null, default: `{}`]
  indexes {
    (type, roomId) [name: 'idx_memories_type_room']
    () [name: 'idx_memories_metadata_type']
    () [name: 'idx_memories_document_id']
    () [name: 'idx_fragments_order']
  }
}

here is dump of the config


INDEX Index {
  config: {
    name: "idx_memories_metadata_type",
    columns: [
      SQL {
        decoder: {
          mapFromDriverValue: [Function: mapFromDriverValue],
        },
        shouldInlineParams: false,
        queryChunks: [
          StringChunk {
            value: [ "((metadata->>'type'))" ],
            getSQL: [Function: getSQL],
          }
        ],
        append: [Function: append],
        toQuery: [Function: toQuery],
        buildQueryFromSourceParams: [Function: buildQueryFromSourceParams],
        mapInlineParam: [Function: mapInlineParam],
        getSQL: [Function: getSQL],
        as: [Function: as],
        mapWith: [Function: mapWith],
        inlineParams: [Function: inlineParams],
        if: [Function: if],
      }
    ],
    unique: false,
    only: false,
    method: "btree",
    table: PgTable {
      [Symbol(drizzle:Name)]: "memories",
      [Symbol(drizzle:OriginalName)]: "memories",
      [Symbol(drizzle:Schema)]: undefined,
      [Symbol(drizzle:Columns)]: {
        id: PgUUID {
          name: "id",
          keyAsName: false,
          primary: true,
          notNull: true,
          default: undefined,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: false,
          isUnique: false,
          uniqueName: "memories_id_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgUUID",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "id",
            keyAsName: false,
            notNull: true,
            default: undefined,
            hasDefault: false,
            primaryKey: true,
            isUnique: false,
            uniqueName: "memories_id_unique",
            uniqueType: undefined,
            dataType: "string",
            columnType: "PgUUID",
            generated: undefined,
          },
          table: [Circular],
          getSQLType: [Function: getSQLType],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        type: PgText {
          name: "type",
          keyAsName: false,
          primary: false,
          notNull: true,
          default: undefined,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: false,
          isUnique: false,
          uniqueName: "memories_type_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgText",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "type",
            keyAsName: false,
            notNull: true,
            default: undefined,
            hasDefault: false,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_type_unique",
            uniqueType: undefined,
            dataType: "string",
            columnType: "PgText",
            generated: undefined,
            enumValues: undefined,
          },
          table: [Circular],
          getSQLType: [Function: getSQLType],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        createdAt: PgCustomColumn {
          name: "createdAt",
          keyAsName: false,
          primary: false,
          notNull: true,
          default: SQL {
            decoder: {
              mapFromDriverValue: [Function: mapFromDriverValue],
            },
            shouldInlineParams: false,
            queryChunks: [
              StringChunk {
                value: [ "now()" ],
                getSQL: [Function: getSQL],
              }
            ],
            append: [Function: append],
            toQuery: [Function: toQuery],
            buildQueryFromSourceParams: [Function: buildQueryFromSourceParams],
            mapInlineParam: [Function: mapInlineParam],
            getSQL: [Function: getSQL],
            as: [Function: as],
            mapWith: [Function: mapWith],
            inlineParams: [Function: inlineParams],
            if: [Function: if],
          },
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: true,
          isUnique: false,
          uniqueName: "memories_createdAt_unique",
          uniqueType: undefined,
          dataType: "custom",
          columnType: "PgCustomColumn",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "createdAt",
            keyAsName: false,
            notNull: true,
            default: SQL {
              decoder: {
                mapFromDriverValue: [Function: mapFromDriverValue],
              },
              shouldInlineParams: false,
              queryChunks: [
                StringChunk {
                  value: [ "now()" ],
                  getSQL: [Function: getSQL],
                }
              ],
              append: [Function: append],
              toQuery: [Function: toQuery],
              buildQueryFromSourceParams: [Function: buildQueryFromSourceParams],
              mapInlineParam: [Function: mapInlineParam],
              getSQL: [Function: getSQL],
              as: [Function: as],
              mapWith: [Function: mapWith],
              inlineParams: [Function: inlineParams],
              if: [Function: if],
            },
            hasDefault: true,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_createdAt_unique",
            uniqueType: undefined,
            dataType: "custom",
            columnType: "PgCustomColumn",
            generated: undefined,
            fieldConfig: undefined,
            customTypeParams: {
              dataType: [Function: dataType],
              toDriver: [Function: toDriver],
              fromDriver: [Function: fromDriver],
            },
          },
          table: [Circular],
          sqlName: "timestamptz",
          mapTo: [Function: toDriver],
          mapFrom: [Function: fromDriver],
          getSQLType: [Function: getSQLType],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        content: PgJsonb {
          name: "content",
          keyAsName: false,
          primary: false,
          notNull: true,
          default: undefined,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: false,
          isUnique: false,
          uniqueName: "memories_content_unique",
          uniqueType: undefined,
          dataType: "json",
          columnType: "PgJsonb",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "content",
            keyAsName: false,
            notNull: true,
            default: undefined,
            hasDefault: false,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_content_unique",
            uniqueType: undefined,
            dataType: "json",
            columnType: "PgJsonb",
            generated: undefined,
          },
          table: [Circular],
          getSQLType: [Function: getSQLType],
          mapToDriverValue: [Function: mapToDriverValue],
          mapFromDriverValue: [Function: mapFromDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        entityId: PgUUID {
          name: "entityId",
          keyAsName: false,
          primary: false,
          notNull: false,
          default: undefined,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: false,
          isUnique: false,
          uniqueName: "memories_entityId_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgUUID",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "entityId",
            keyAsName: false,
            notNull: false,
            default: undefined,
            hasDefault: false,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_entityId_unique",
            uniqueType: undefined,
            dataType: "string",
            columnType: "PgUUID",
            generated: undefined,
          },
          table: [Circular],
          getSQLType: [Function: getSQLType],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        agentId: PgUUID {
          name: "agentId",
          keyAsName: false,
          primary: false,
          notNull: false,
          default: undefined,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: false,
          isUnique: false,
          uniqueName: "memories_agentId_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgUUID",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "agentId",
            keyAsName: false,
            notNull: false,
            default: undefined,
            hasDefault: false,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_agentId_unique",
            uniqueType: undefined,
            dataType: "string",
            columnType: "PgUUID",
            generated: undefined,
          },
          table: [Circular],
          getSQLType: [Function: getSQLType],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        roomId: PgUUID {
          name: "roomId",
          keyAsName: false,
          primary: false,
          notNull: false,
          default: undefined,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: false,
          isUnique: false,
          uniqueName: "memories_roomId_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgUUID",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "roomId",
            keyAsName: false,
            notNull: false,
            default: undefined,
            hasDefault: false,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_roomId_unique",
            uniqueType: undefined,
            dataType: "string",
            columnType: "PgUUID",
            generated: undefined,
          },
          table: [Circular],
          getSQLType: [Function: getSQLType],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        unique: PgBoolean {
          name: "unique",
          keyAsName: false,
          primary: false,
          notNull: true,
          default: true,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: true,
          isUnique: false,
          uniqueName: "memories_unique_unique",
          uniqueType: undefined,
          dataType: "boolean",
          columnType: "PgBoolean",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "unique",
            keyAsName: false,
            notNull: true,
            default: true,
            hasDefault: true,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_unique_unique",
            uniqueType: undefined,
            dataType: "boolean",
            columnType: "PgBoolean",
            generated: undefined,
          },
          table: [Circular],
          getSQLType: [Function: getSQLType],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        metadata: PgJsonb {
          name: "metadata",
          keyAsName: false,
          primary: false,
          notNull: true,
          default: {},
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: true,
          isUnique: false,
          uniqueName: "memories_metadata_unique",
          uniqueType: undefined,
          dataType: "json",
          columnType: "PgJsonb",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "metadata",
            keyAsName: false,
            notNull: true,
            default: {},
            hasDefault: true,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_metadata_unique",
            uniqueType: undefined,
            dataType: "json",
            columnType: "PgJsonb",
            generated: undefined,
          },
          table: [Circular],
          getSQLType: [Function: getSQLType],
          mapToDriverValue: [Function: mapToDriverValue],
          mapFromDriverValue: [Function: mapFromDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
      },
      [Symbol(drizzle:ExtraConfigColumns)]: {
        id: ExtraConfigColumn {
          name: "id",
          keyAsName: false,
          primary: true,
          notNull: true,
          default: undefined,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: false,
          isUnique: false,
          uniqueName: "memories_id_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgUUID",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "id",
            keyAsName: false,
            notNull: true,
            default: undefined,
            hasDefault: false,
            primaryKey: true,
            isUnique: false,
            uniqueName: "memories_id_unique",
            uniqueType: undefined,
            dataType: "string",
            columnType: "PgUUID",
            generated: undefined,
          },
          table: [Circular],
          indexConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          defaultConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          getSQLType: [Function: getSQLType],
          asc: [Function: asc],
          desc: [Function: desc],
          nullsFirst: [Function: nullsFirst],
          nullsLast: [Function: nullsLast],
          op: [Function: op],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        type: ExtraConfigColumn {
          name: "type",
          keyAsName: false,
          primary: false,
          notNull: true,
          default: undefined,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: false,
          isUnique: false,
          uniqueName: "memories_type_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgText",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "type",
            keyAsName: false,
            notNull: true,
            default: undefined,
            hasDefault: false,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_type_unique",
            uniqueType: undefined,
            dataType: "string",
            columnType: "PgText",
            generated: undefined,
            enumValues: undefined,
          },
          table: [Circular],
          indexConfig: {
            order: "asc",
            nulls: "last",
          },
          defaultConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          getSQLType: [Function: getSQLType],
          asc: [Function: asc],
          desc: [Function: desc],
          nullsFirst: [Function: nullsFirst],
          nullsLast: [Function: nullsLast],
          op: [Function: op],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        createdAt: ExtraConfigColumn {
          name: "createdAt",
          keyAsName: false,
          primary: false,
          notNull: true,
          default: SQL {
            decoder: {
              mapFromDriverValue: [Function: mapFromDriverValue],
            },
            shouldInlineParams: false,
            queryChunks: [
              StringChunk {
                value: [ "now()" ],
                getSQL: [Function: getSQL],
              }
            ],
            append: [Function: append],
            toQuery: [Function: toQuery],
            buildQueryFromSourceParams: [Function: buildQueryFromSourceParams],
            mapInlineParam: [Function: mapInlineParam],
            getSQL: [Function: getSQL],
            as: [Function: as],
            mapWith: [Function: mapWith],
            inlineParams: [Function: inlineParams],
            if: [Function: if],
          },
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: true,
          isUnique: false,
          uniqueName: "memories_createdAt_unique",
          uniqueType: undefined,
          dataType: "custom",
          columnType: "PgCustomColumn",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "createdAt",
            keyAsName: false,
            notNull: true,
            default: SQL {
              decoder: {
                mapFromDriverValue: [Function: mapFromDriverValue],
              },
              shouldInlineParams: false,
              queryChunks: [
                StringChunk {
                  value: [ "now()" ],
                  getSQL: [Function: getSQL],
                }
              ],
              append: [Function: append],
              toQuery: [Function: toQuery],
              buildQueryFromSourceParams: [Function: buildQueryFromSourceParams],
              mapInlineParam: [Function: mapInlineParam],
              getSQL: [Function: getSQL],
              as: [Function: as],
              mapWith: [Function: mapWith],
              inlineParams: [Function: inlineParams],
              if: [Function: if],
            },
            hasDefault: true,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_createdAt_unique",
            uniqueType: undefined,
            dataType: "custom",
            columnType: "PgCustomColumn",
            generated: undefined,
            fieldConfig: undefined,
            customTypeParams: {
              dataType: [Function: dataType],
              toDriver: [Function: toDriver],
              fromDriver: [Function: fromDriver],
            },
          },
          table: [Circular],
          indexConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          defaultConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          getSQLType: [Function: getSQLType],
          asc: [Function: asc],
          desc: [Function: desc],
          nullsFirst: [Function: nullsFirst],
          nullsLast: [Function: nullsLast],
          op: [Function: op],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        content: ExtraConfigColumn {
          name: "content",
          keyAsName: false,
          primary: false,
          notNull: true,
          default: undefined,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: false,
          isUnique: false,
          uniqueName: "memories_content_unique",
          uniqueType: undefined,
          dataType: "json",
          columnType: "PgJsonb",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "content",
            keyAsName: false,
            notNull: true,
            default: undefined,
            hasDefault: false,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_content_unique",
            uniqueType: undefined,
            dataType: "json",
            columnType: "PgJsonb",
            generated: undefined,
          },
          table: [Circular],
          indexConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          defaultConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          getSQLType: [Function: getSQLType],
          asc: [Function: asc],
          desc: [Function: desc],
          nullsFirst: [Function: nullsFirst],
          nullsLast: [Function: nullsLast],
          op: [Function: op],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        entityId: ExtraConfigColumn {
          name: "entityId",
          keyAsName: false,
          primary: false,
          notNull: false,
          default: undefined,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: false,
          isUnique: false,
          uniqueName: "memories_entityId_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgUUID",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "entityId",
            keyAsName: false,
            notNull: false,
            default: undefined,
            hasDefault: false,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_entityId_unique",
            uniqueType: undefined,
            dataType: "string",
            columnType: "PgUUID",
            generated: undefined,
          },
          table: [Circular],
          indexConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          defaultConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          getSQLType: [Function: getSQLType],
          asc: [Function: asc],
          desc: [Function: desc],
          nullsFirst: [Function: nullsFirst],
          nullsLast: [Function: nullsLast],
          op: [Function: op],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        agentId: ExtraConfigColumn {
          name: "agentId",
          keyAsName: false,
          primary: false,
          notNull: false,
          default: undefined,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: false,
          isUnique: false,
          uniqueName: "memories_agentId_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgUUID",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "agentId",
            keyAsName: false,
            notNull: false,
            default: undefined,
            hasDefault: false,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_agentId_unique",
            uniqueType: undefined,
            dataType: "string",
            columnType: "PgUUID",
            generated: undefined,
          },
          table: [Circular],
          indexConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          defaultConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          getSQLType: [Function: getSQLType],
          asc: [Function: asc],
          desc: [Function: desc],
          nullsFirst: [Function: nullsFirst],
          nullsLast: [Function: nullsLast],
          op: [Function: op],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        roomId: ExtraConfigColumn {
          name: "roomId",
          keyAsName: false,
          primary: false,
          notNull: false,
          default: undefined,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: false,
          isUnique: false,
          uniqueName: "memories_roomId_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgUUID",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "roomId",
            keyAsName: false,
            notNull: false,
            default: undefined,
            hasDefault: false,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_roomId_unique",
            uniqueType: undefined,
            dataType: "string",
            columnType: "PgUUID",
            generated: undefined,
          },
          table: [Circular],
          indexConfig: {
            order: "asc",
            nulls: "last",
          },
          defaultConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          getSQLType: [Function: getSQLType],
          asc: [Function: asc],
          desc: [Function: desc],
          nullsFirst: [Function: nullsFirst],
          nullsLast: [Function: nullsLast],
          op: [Function: op],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        unique: ExtraConfigColumn {
          name: "unique",
          keyAsName: false,
          primary: false,
          notNull: true,
          default: true,
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: true,
          isUnique: false,
          uniqueName: "memories_unique_unique",
          uniqueType: undefined,
          dataType: "boolean",
          columnType: "PgBoolean",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "unique",
            keyAsName: false,
            notNull: true,
            default: true,
            hasDefault: true,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_unique_unique",
            uniqueType: undefined,
            dataType: "boolean",
            columnType: "PgBoolean",
            generated: undefined,
          },
          table: [Circular],
          indexConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          defaultConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          getSQLType: [Function: getSQLType],
          asc: [Function: asc],
          desc: [Function: desc],
          nullsFirst: [Function: nullsFirst],
          nullsLast: [Function: nullsLast],
          op: [Function: op],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
        metadata: ExtraConfigColumn {
          name: "metadata",
          keyAsName: false,
          primary: false,
          notNull: true,
          default: {},
          defaultFn: undefined,
          onUpdateFn: undefined,
          hasDefault: true,
          isUnique: false,
          uniqueName: "memories_metadata_unique",
          uniqueType: undefined,
          dataType: "json",
          columnType: "PgJsonb",
          enumValues: undefined,
          generated: undefined,
          generatedIdentity: undefined,
          config: {
            name: "metadata",
            keyAsName: false,
            notNull: true,
            default: {},
            hasDefault: true,
            primaryKey: false,
            isUnique: false,
            uniqueName: "memories_metadata_unique",
            uniqueType: undefined,
            dataType: "json",
            columnType: "PgJsonb",
            generated: undefined,
          },
          table: [Circular],
          indexConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          defaultConfig: {
            order: "asc",
            nulls: "last",
            opClass: undefined,
          },
          getSQLType: [Function: getSQLType],
          asc: [Function: asc],
          desc: [Function: desc],
          nullsFirst: [Function: nullsFirst],
          nullsLast: [Function: nullsLast],
          op: [Function: op],
          mapFromDriverValue: [Function: mapFromDriverValue],
          mapToDriverValue: [Function: mapToDriverValue],
          shouldDisableInsert: [Function: shouldDisableInsert],
          getSQL: [Function],
        },
      },
      [Symbol(drizzle:BaseName)]: "memories",
      [Symbol(drizzle:IsAlias)]: false,
      [Symbol(drizzle:IsDrizzleTable)]: true,
      [Symbol(drizzle:ExtraConfigBuilder)]: [Function],
      [Symbol(drizzle:PgInlineForeignKeys)]: [
        ForeignKey {
          reference: [Function],
          onUpdate: "no action",
          onDelete: "cascade",
          table: [Circular],
          getName: [Function: getName],
        }, ForeignKey {
          reference: [Function],
          onUpdate: "no action",
          onDelete: "cascade",
          table: [Circular],
          getName: [Function: getName],
        }, ForeignKey {
          reference: [Function],
          onUpdate: "no action",
          onDelete: "cascade",
          table: [Circular],
          getName: [Function: getName],
        }
      ],
      [Symbol(drizzle:EnableRLS)]: false,
      id: PgUUID {
        name: "id",
        keyAsName: false,
        primary: true,
        notNull: true,
        default: undefined,
        defaultFn: undefined,
        onUpdateFn: undefined,
        hasDefault: false,
        isUnique: false,
        uniqueName: "memories_id_unique",
        uniqueType: undefined,
        dataType: "string",
        columnType: "PgUUID",
        enumValues: undefined,
        generated: undefined,
        generatedIdentity: undefined,
        config: {
          name: "id",
          keyAsName: false,
          notNull: true,
          default: undefined,
          hasDefault: false,
          primaryKey: true,
          isUnique: false,
          uniqueName: "memories_id_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgUUID",
          generated: undefined,
        },
        table: [Circular],
        getSQLType: [Function: getSQLType],
        mapFromDriverValue: [Function: mapFromDriverValue],
        mapToDriverValue: [Function: mapToDriverValue],
        shouldDisableInsert: [Function: shouldDisableInsert],
        getSQL: [Function],
      },
      type: PgText {
        name: "type",
        keyAsName: false,
        primary: false,
        notNull: true,
        default: undefined,
        defaultFn: undefined,
        onUpdateFn: undefined,
        hasDefault: false,
        isUnique: false,
        uniqueName: "memories_type_unique",
        uniqueType: undefined,
        dataType: "string",
        columnType: "PgText",
        enumValues: undefined,
        generated: undefined,
        generatedIdentity: undefined,
        config: {
          name: "type",
          keyAsName: false,
          notNull: true,
          default: undefined,
          hasDefault: false,
          primaryKey: false,
          isUnique: false,
          uniqueName: "memories_type_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgText",
          generated: undefined,
          enumValues: undefined,
        },
        table: [Circular],
        getSQLType: [Function: getSQLType],
        mapFromDriverValue: [Function: mapFromDriverValue],
        mapToDriverValue: [Function: mapToDriverValue],
        shouldDisableInsert: [Function: shouldDisableInsert],
        getSQL: [Function],
      },
      createdAt: PgCustomColumn {
        name: "createdAt",
        keyAsName: false,
        primary: false,
        notNull: true,
        default: SQL {
          decoder: {
            mapFromDriverValue: [Function: mapFromDriverValue],
          },
          shouldInlineParams: false,
          queryChunks: [
            StringChunk {
              value: [ "now()" ],
              getSQL: [Function: getSQL],
            }
          ],
          append: [Function: append],
          toQuery: [Function: toQuery],
          buildQueryFromSourceParams: [Function: buildQueryFromSourceParams],
          mapInlineParam: [Function: mapInlineParam],
          getSQL: [Function: getSQL],
          as: [Function: as],
          mapWith: [Function: mapWith],
          inlineParams: [Function: inlineParams],
          if: [Function: if],
        },
        defaultFn: undefined,
        onUpdateFn: undefined,
        hasDefault: true,
        isUnique: false,
        uniqueName: "memories_createdAt_unique",
        uniqueType: undefined,
        dataType: "custom",
        columnType: "PgCustomColumn",
        enumValues: undefined,
        generated: undefined,
        generatedIdentity: undefined,
        config: {
          name: "createdAt",
          keyAsName: false,
          notNull: true,
          default: SQL {
            decoder: {
              mapFromDriverValue: [Function: mapFromDriverValue],
            },
            shouldInlineParams: false,
            queryChunks: [
              StringChunk {
                value: [ "now()" ],
                getSQL: [Function: getSQL],
              }
            ],
            append: [Function: append],
            toQuery: [Function: toQuery],
            buildQueryFromSourceParams: [Function: buildQueryFromSourceParams],
            mapInlineParam: [Function: mapInlineParam],
            getSQL: [Function: getSQL],
            as: [Function: as],
            mapWith: [Function: mapWith],
            inlineParams: [Function: inlineParams],
            if: [Function: if],
          },
          hasDefault: true,
          primaryKey: false,
          isUnique: false,
          uniqueName: "memories_createdAt_unique",
          uniqueType: undefined,
          dataType: "custom",
          columnType: "PgCustomColumn",
          generated: undefined,
          fieldConfig: undefined,
          customTypeParams: {
            dataType: [Function: dataType],
            toDriver: [Function: toDriver],
            fromDriver: [Function: fromDriver],
          },
        },
        table: [Circular],
        sqlName: "timestamptz",
        mapTo: [Function: toDriver],
        mapFrom: [Function: fromDriver],
        getSQLType: [Function: getSQLType],
        mapFromDriverValue: [Function: mapFromDriverValue],
        mapToDriverValue: [Function: mapToDriverValue],
        shouldDisableInsert: [Function: shouldDisableInsert],
        getSQL: [Function],
      },
      content: PgJsonb {
        name: "content",
        keyAsName: false,
        primary: false,
        notNull: true,
        default: undefined,
        defaultFn: undefined,
        onUpdateFn: undefined,
        hasDefault: false,
        isUnique: false,
        uniqueName: "memories_content_unique",
        uniqueType: undefined,
        dataType: "json",
        columnType: "PgJsonb",
        enumValues: undefined,
        generated: undefined,
        generatedIdentity: undefined,
        config: {
          name: "content",
          keyAsName: false,
          notNull: true,
          default: undefined,
          hasDefault: false,
          primaryKey: false,
          isUnique: false,
          uniqueName: "memories_content_unique",
          uniqueType: undefined,
          dataType: "json",
          columnType: "PgJsonb",
          generated: undefined,
        },
        table: [Circular],
        getSQLType: [Function: getSQLType],
        mapToDriverValue: [Function: mapToDriverValue],
        mapFromDriverValue: [Function: mapFromDriverValue],
        shouldDisableInsert: [Function: shouldDisableInsert],
        getSQL: [Function],
      },
      entityId: PgUUID {
        name: "entityId",
        keyAsName: false,
        primary: false,
        notNull: false,
        default: undefined,
        defaultFn: undefined,
        onUpdateFn: undefined,
        hasDefault: false,
        isUnique: false,
        uniqueName: "memories_entityId_unique",
        uniqueType: undefined,
        dataType: "string",
        columnType: "PgUUID",
        enumValues: undefined,
        generated: undefined,
        generatedIdentity: undefined,
        config: {
          name: "entityId",
          keyAsName: false,
          notNull: false,
          default: undefined,
          hasDefault: false,
          primaryKey: false,
          isUnique: false,
          uniqueName: "memories_entityId_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgUUID",
          generated: undefined,
        },
        table: [Circular],
        getSQLType: [Function: getSQLType],
        mapFromDriverValue: [Function: mapFromDriverValue],
        mapToDriverValue: [Function: mapToDriverValue],
        shouldDisableInsert: [Function: shouldDisableInsert],
        getSQL: [Function],
      },
      agentId: PgUUID {
        name: "agentId",
        keyAsName: false,
        primary: false,
        notNull: false,
        default: undefined,
        defaultFn: undefined,
        onUpdateFn: undefined,
        hasDefault: false,
        isUnique: false,
        uniqueName: "memories_agentId_unique",
        uniqueType: undefined,
        dataType: "string",
        columnType: "PgUUID",
        enumValues: undefined,
        generated: undefined,
        generatedIdentity: undefined,
        config: {
          name: "agentId",
          keyAsName: false,
          notNull: false,
          default: undefined,
          hasDefault: false,
          primaryKey: false,
          isUnique: false,
          uniqueName: "memories_agentId_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgUUID",
          generated: undefined,
        },
        table: [Circular],
        getSQLType: [Function: getSQLType],
        mapFromDriverValue: [Function: mapFromDriverValue],
        mapToDriverValue: [Function: mapToDriverValue],
        shouldDisableInsert: [Function: shouldDisableInsert],
        getSQL: [Function],
      },
      roomId: PgUUID {
        name: "roomId",
        keyAsName: false,
        primary: false,
        notNull: false,
        default: undefined,
        defaultFn: undefined,
        onUpdateFn: undefined,
        hasDefault: false,
        isUnique: false,
        uniqueName: "memories_roomId_unique",
        uniqueType: undefined,
        dataType: "string",
        columnType: "PgUUID",
        enumValues: undefined,
        generated: undefined,
        generatedIdentity: undefined,
        config: {
          name: "roomId",
          keyAsName: false,
          notNull: false,
          default: undefined,
          hasDefault: false,
          primaryKey: false,
          isUnique: false,
          uniqueName: "memories_roomId_unique",
          uniqueType: undefined,
          dataType: "string",
          columnType: "PgUUID",
          generated: undefined,
        },
        table: [Circular],
        getSQLType: [Function: getSQLType],
        mapFromDriverValue: [Function: mapFromDriverValue],
        mapToDriverValue: [Function: mapToDriverValue],
        shouldDisableInsert: [Function: shouldDisableInsert],
        getSQL: [Function],
      },
      unique: PgBoolean {
        name: "unique",
        keyAsName: false,
        primary: false,
        notNull: true,
        default: true,
        defaultFn: undefined,
        onUpdateFn: undefined,
        hasDefault: true,
        isUnique: false,
        uniqueName: "memories_unique_unique",
        uniqueType: undefined,
        dataType: "boolean",
        columnType: "PgBoolean",
        enumValues: undefined,
        generated: undefined,
        generatedIdentity: undefined,
        config: {
          name: "unique",
          keyAsName: false,
          notNull: true,
          default: true,
          hasDefault: true,
          primaryKey: false,
          isUnique: false,
          uniqueName: "memories_unique_unique",
          uniqueType: undefined,
          dataType: "boolean",
          columnType: "PgBoolean",
          generated: undefined,
        },
        table: [Circular],
        getSQLType: [Function: getSQLType],
        mapFromDriverValue: [Function: mapFromDriverValue],
        mapToDriverValue: [Function: mapToDriverValue],
        shouldDisableInsert: [Function: shouldDisableInsert],
        getSQL: [Function],
      },
      metadata: PgJsonb {
        name: "metadata",
        keyAsName: false,
        primary: false,
        notNull: true,
        default: {},
        defaultFn: undefined,
        onUpdateFn: undefined,
        hasDefault: true,
        isUnique: false,
        uniqueName: "memories_metadata_unique",
        uniqueType: undefined,
        dataType: "json",
        columnType: "PgJsonb",
        enumValues: undefined,
        generated: undefined,
        generatedIdentity: undefined,
        config: {
          name: "metadata",
          keyAsName: false,
          notNull: true,
          default: {},
          hasDefault: true,
          primaryKey: false,
          isUnique: false,
          uniqueName: "memories_metadata_unique",
          uniqueType: undefined,
          dataType: "json",
          columnType: "PgJsonb",
          generated: undefined,
        },
        table: [Circular],
        getSQLType: [Function: getSQLType],
        mapToDriverValue: [Function: mapToDriverValue],
        mapFromDriverValue: [Function: mapFromDriverValue],
        shouldDisableInsert: [Function: shouldDisableInsert],
        getSQL: [Function],
      },
      enableRLS: [Function: enableRLS],
      getSQL: [Function],
    },
  },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions