feat: sync memories (#19579)

This commit is contained in:
Jason Rasmussen
2025-06-27 12:20:13 -04:00
committed by GitHub
parent 97aabe466e
commit 6feca56da8
31 changed files with 1482 additions and 203 deletions
@@ -0,0 +1,22 @@
import { ColumnType } from 'kysely';
import { PrimaryGeneratedUuidV7Column } from 'src/decorators';
import { Column, CreateDateColumn, Table } from 'src/sql-tools';
type Timestamp = ColumnType<Date, Date | string, Date | string>;
type Generated<T> =
T extends ColumnType<infer S, infer I, infer U> ? ColumnType<S, I | undefined, U> : ColumnType<T, T | undefined, T>;
@Table('memories_audit')
export class MemoryAuditTable {
@PrimaryGeneratedUuidV7Column()
id!: Generated<string>;
@Column({ type: 'uuid', indexName: 'IDX_memories_audit_memory_id' })
memoryId!: string;
@Column({ type: 'uuid', indexName: 'IDX_memories_audit_user_id' })
userId!: string;
@CreateDateColumn({ default: () => 'clock_timestamp()', indexName: 'IDX_memories_audit_deleted_at' })
deletedAt!: Timestamp;
}