MCPcopy
hub / github.com/drizzle-team/drizzle-orm / LehaColumnsHandler

Class LehaColumnsHandler

drizzle-kit/src/simulator.ts:87–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 return handler.handle(added, removed);
86};
87class LehaColumnsHandler<T extends Named> implements ColumnsHandler<T> {
88 can(tableName: string, _: T[], __: T[]): boolean {
89 return tableName === 'users';
90 }
91
92 handle(
93 tableName: string,
94 added: T[],
95 removed: T[],
96 ): { tableName: string; created: T[]; deleted: T[]; renamed: { from: T; to: T }[] } {
97 return { tableName, created: [], deleted: [], renamed: [{ from: removed[0], to: added[0] }] };
98 }
99}
100
101class DryRunColumnsHandler<T extends Named> implements ColumnsHandler<T> {
102 can(tableName: string, _: T[], __: T[]): boolean {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected