@elizaos/plugin-sql 1.6.5-alpha.13 → 1.6.5-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/tsconfig.build.tsbuildinfo +1 -1
- package/dist/node/index.d.ts +2 -2
- package/dist/node/tsconfig.build.node.tsbuildinfo +1 -1
- package/package.json +6 -5
- package/dist/browser/base.d.ts +0 -965
- package/dist/browser/index.browser.d.ts +0 -11
- package/dist/browser/migration-service.d.ts +0 -43
- package/dist/browser/migrations.d.ts +0 -15
- package/dist/browser/pglite/adapter.d.ts +0 -76
- package/dist/browser/pglite/manager.d.ts +0 -21
- package/dist/browser/rls.d.ts +0 -156
- package/dist/browser/runtime-migrator/drizzle-adapters/database-introspector.d.ts +0 -62
- package/dist/browser/runtime-migrator/drizzle-adapters/diff-calculator.d.ts +0 -59
- package/dist/browser/runtime-migrator/drizzle-adapters/snapshot-generator.d.ts +0 -18
- package/dist/browser/runtime-migrator/drizzle-adapters/sql-generator.d.ts +0 -38
- package/dist/browser/runtime-migrator/extension-manager.d.ts +0 -6
- package/dist/browser/runtime-migrator/index.d.ts +0 -8
- package/dist/browser/runtime-migrator/runtime-migrator.d.ts +0 -96
- package/dist/browser/runtime-migrator/schema-transformer.d.ts +0 -16
- package/dist/browser/runtime-migrator/storage/journal-storage.d.ts +0 -10
- package/dist/browser/runtime-migrator/storage/migration-tracker.d.ts +0 -13
- package/dist/browser/runtime-migrator/storage/snapshot-storage.d.ts +0 -9
- package/dist/browser/runtime-migrator/types.d.ts +0 -48
- package/dist/browser/schema/agent.d.ts +0 -344
- package/dist/browser/schema/cache.d.ts +0 -97
- package/dist/browser/schema/channel.d.ts +0 -177
- package/dist/browser/schema/channelParticipant.d.ts +0 -41
- package/dist/browser/schema/component.d.ts +0 -163
- package/dist/browser/schema/embedding.d.ts +0 -193
- package/dist/browser/schema/entity.d.ts +0 -122
- package/dist/browser/schema/index.d.ts +0 -18
- package/dist/browser/schema/log.d.ts +0 -114
- package/dist/browser/schema/memory.d.ts +0 -188
- package/dist/browser/schema/message.d.ts +0 -1
- package/dist/browser/schema/messageServer.d.ts +0 -126
- package/dist/browser/schema/messageServerAgent.d.ts +0 -41
- package/dist/browser/schema/participant.d.ts +0 -114
- package/dist/browser/schema/relationship.d.ts +0 -156
- package/dist/browser/schema/room.d.ts +0 -192
- package/dist/browser/schema/server.d.ts +0 -64
- package/dist/browser/schema/tasks.d.ts +0 -225
- package/dist/browser/schema/types.d.ts +0 -68
- package/dist/browser/schema/world.d.ts +0 -114
- package/dist/browser/src/base.d.ts +0 -965
- package/dist/browser/src/index.browser.d.ts +0 -11
- package/dist/browser/src/migration-service.d.ts +0 -43
- package/dist/browser/src/migrations.d.ts +0 -15
- package/dist/browser/src/pglite/adapter.d.ts +0 -76
- package/dist/browser/src/pglite/manager.d.ts +0 -21
- package/dist/browser/src/rls.d.ts +0 -156
- package/dist/browser/src/runtime-migrator/drizzle-adapters/database-introspector.d.ts +0 -62
- package/dist/browser/src/runtime-migrator/drizzle-adapters/diff-calculator.d.ts +0 -59
- package/dist/browser/src/runtime-migrator/drizzle-adapters/snapshot-generator.d.ts +0 -18
- package/dist/browser/src/runtime-migrator/drizzle-adapters/sql-generator.d.ts +0 -38
- package/dist/browser/src/runtime-migrator/extension-manager.d.ts +0 -6
- package/dist/browser/src/runtime-migrator/index.d.ts +0 -8
- package/dist/browser/src/runtime-migrator/runtime-migrator.d.ts +0 -96
- package/dist/browser/src/runtime-migrator/schema-transformer.d.ts +0 -16
- package/dist/browser/src/runtime-migrator/storage/journal-storage.d.ts +0 -10
- package/dist/browser/src/runtime-migrator/storage/migration-tracker.d.ts +0 -13
- package/dist/browser/src/runtime-migrator/storage/snapshot-storage.d.ts +0 -9
- package/dist/browser/src/runtime-migrator/types.d.ts +0 -48
- package/dist/browser/src/schema/agent.d.ts +0 -344
- package/dist/browser/src/schema/cache.d.ts +0 -97
- package/dist/browser/src/schema/channel.d.ts +0 -177
- package/dist/browser/src/schema/channelParticipant.d.ts +0 -41
- package/dist/browser/src/schema/component.d.ts +0 -163
- package/dist/browser/src/schema/embedding.d.ts +0 -193
- package/dist/browser/src/schema/entity.d.ts +0 -122
- package/dist/browser/src/schema/index.d.ts +0 -18
- package/dist/browser/src/schema/log.d.ts +0 -114
- package/dist/browser/src/schema/memory.d.ts +0 -188
- package/dist/browser/src/schema/message.d.ts +0 -1
- package/dist/browser/src/schema/messageServer.d.ts +0 -126
- package/dist/browser/src/schema/messageServerAgent.d.ts +0 -41
- package/dist/browser/src/schema/participant.d.ts +0 -114
- package/dist/browser/src/schema/relationship.d.ts +0 -156
- package/dist/browser/src/schema/room.d.ts +0 -192
- package/dist/browser/src/schema/server.d.ts +0 -64
- package/dist/browser/src/schema/tasks.d.ts +0 -225
- package/dist/browser/src/schema/types.d.ts +0 -68
- package/dist/browser/src/schema/world.d.ts +0 -114
- package/dist/browser/src/types.d.ts +0 -15
- package/dist/browser/src/utils.browser.d.ts +0 -21
- package/dist/browser/types.d.ts +0 -15
- package/dist/browser/utils.browser.d.ts +0 -21
- package/dist/node/src/base.d.ts +0 -965
- package/dist/node/src/index.d.ts +0 -33
- package/dist/node/src/index.node.d.ts +0 -10
- package/dist/node/src/migration-service.d.ts +0 -43
- package/dist/node/src/migrations.d.ts +0 -15
- package/dist/node/src/pg/adapter.d.ts +0 -78
- package/dist/node/src/pg/manager.d.ts +0 -33
- package/dist/node/src/pglite/adapter.d.ts +0 -76
- package/dist/node/src/pglite/manager.d.ts +0 -21
- package/dist/node/src/rls.d.ts +0 -156
- package/dist/node/src/runtime-migrator/drizzle-adapters/database-introspector.d.ts +0 -62
- package/dist/node/src/runtime-migrator/drizzle-adapters/diff-calculator.d.ts +0 -59
- package/dist/node/src/runtime-migrator/drizzle-adapters/snapshot-generator.d.ts +0 -18
- package/dist/node/src/runtime-migrator/drizzle-adapters/sql-generator.d.ts +0 -38
- package/dist/node/src/runtime-migrator/extension-manager.d.ts +0 -6
- package/dist/node/src/runtime-migrator/index.d.ts +0 -8
- package/dist/node/src/runtime-migrator/runtime-migrator.d.ts +0 -96
- package/dist/node/src/runtime-migrator/schema-transformer.d.ts +0 -16
- package/dist/node/src/runtime-migrator/storage/journal-storage.d.ts +0 -10
- package/dist/node/src/runtime-migrator/storage/migration-tracker.d.ts +0 -13
- package/dist/node/src/runtime-migrator/storage/snapshot-storage.d.ts +0 -9
- package/dist/node/src/runtime-migrator/types.d.ts +0 -48
- package/dist/node/src/schema/agent.d.ts +0 -344
- package/dist/node/src/schema/cache.d.ts +0 -97
- package/dist/node/src/schema/channel.d.ts +0 -177
- package/dist/node/src/schema/channelParticipant.d.ts +0 -41
- package/dist/node/src/schema/component.d.ts +0 -163
- package/dist/node/src/schema/embedding.d.ts +0 -193
- package/dist/node/src/schema/entity.d.ts +0 -122
- package/dist/node/src/schema/index.d.ts +0 -18
- package/dist/node/src/schema/log.d.ts +0 -114
- package/dist/node/src/schema/memory.d.ts +0 -188
- package/dist/node/src/schema/message.d.ts +0 -1
- package/dist/node/src/schema/messageServer.d.ts +0 -126
- package/dist/node/src/schema/messageServerAgent.d.ts +0 -41
- package/dist/node/src/schema/participant.d.ts +0 -114
- package/dist/node/src/schema/relationship.d.ts +0 -156
- package/dist/node/src/schema/room.d.ts +0 -192
- package/dist/node/src/schema/server.d.ts +0 -64
- package/dist/node/src/schema/tasks.d.ts +0 -225
- package/dist/node/src/schema/types.d.ts +0 -68
- package/dist/node/src/schema/world.d.ts +0 -114
- package/dist/node/src/types.d.ts +0 -15
- package/dist/node/src/utils.d.ts +0 -32
- package/dist/node/src/utils.node.d.ts +0 -6
package/dist/node/src/index.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { IDatabaseAdapter, UUID } from '@elizaos/core';
|
|
2
|
-
import { type Plugin } from '@elizaos/core';
|
|
3
|
-
import * as schema from './schema';
|
|
4
|
-
/**
|
|
5
|
-
* Creates a database adapter based on the provided configuration.
|
|
6
|
-
* If a postgresUrl is provided in the config, a PgDatabaseAdapter is initialized using the PostgresConnectionManager.
|
|
7
|
-
* If no postgresUrl is provided, a PgliteDatabaseAdapter is initialized using PGliteClientManager with the dataDir from the config.
|
|
8
|
-
*
|
|
9
|
-
* @param {object} config - The configuration object.
|
|
10
|
-
* @param {string} [config.dataDir] - The directory where data is stored. Defaults to "./.eliza/.elizadb".
|
|
11
|
-
* @param {string} [config.postgresUrl] - The URL for the PostgreSQL database.
|
|
12
|
-
* @param {UUID} agentId - The unique identifier for the agent.
|
|
13
|
-
* @returns {IDatabaseAdapter} The created database adapter.
|
|
14
|
-
*/
|
|
15
|
-
export declare function createDatabaseAdapter(config: {
|
|
16
|
-
dataDir?: string;
|
|
17
|
-
postgresUrl?: string;
|
|
18
|
-
}, agentId: UUID): IDatabaseAdapter;
|
|
19
|
-
/**
|
|
20
|
-
* SQL plugin for database adapter using Drizzle ORM with dynamic plugin schema migrations
|
|
21
|
-
*
|
|
22
|
-
* @typedef {Object} Plugin
|
|
23
|
-
* @property {string} name - The name of the plugin
|
|
24
|
-
* @property {string} description - The description of the plugin
|
|
25
|
-
* @property {Function} init - The initialization function for the plugin
|
|
26
|
-
* @param {any} _ - Input parameter
|
|
27
|
-
* @param {IAgentRuntime} runtime - The runtime environment for the agent
|
|
28
|
-
*/
|
|
29
|
-
export declare const plugin: Plugin;
|
|
30
|
-
export default plugin;
|
|
31
|
-
export { DatabaseMigrationService } from './migration-service';
|
|
32
|
-
export { installRLSFunctions, getOrCreateRlsServer, setServerContext, assignAgentToServer, applyRLSToNewTables, uninstallRLS, } from './rls';
|
|
33
|
-
export { schema };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IDatabaseAdapter, UUID } from '@elizaos/core';
|
|
2
|
-
import { type Plugin } from '@elizaos/core';
|
|
3
|
-
export declare function createDatabaseAdapter(config: {
|
|
4
|
-
dataDir?: string;
|
|
5
|
-
postgresUrl?: string;
|
|
6
|
-
}, agentId: UUID): IDatabaseAdapter;
|
|
7
|
-
export declare const plugin: Plugin;
|
|
8
|
-
export default plugin;
|
|
9
|
-
export { DatabaseMigrationService } from './migration-service';
|
|
10
|
-
export { installRLSFunctions, getOrCreateRlsServer, setServerContext, assignAgentToServer, applyRLSToNewTables, uninstallRLS, } from './rls';
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { type Plugin } from '@elizaos/core';
|
|
2
|
-
import { RuntimeMigrator } from './runtime-migrator';
|
|
3
|
-
import type { DrizzleDatabase } from './types';
|
|
4
|
-
export declare class DatabaseMigrationService {
|
|
5
|
-
private db;
|
|
6
|
-
private registeredSchemas;
|
|
7
|
-
private migrator;
|
|
8
|
-
constructor();
|
|
9
|
-
/**
|
|
10
|
-
* Initialize service with database connection
|
|
11
|
-
* @param db - Drizzle database instance
|
|
12
|
-
*/
|
|
13
|
-
initializeWithDatabase(db: DrizzleDatabase): Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* Auto-discover and register schemas from plugins
|
|
16
|
-
* @param plugins - Array of plugins to scan for schemas
|
|
17
|
-
*/
|
|
18
|
-
discoverAndRegisterPluginSchemas(plugins: Plugin[]): void;
|
|
19
|
-
/**
|
|
20
|
-
* Register a schema for a specific plugin
|
|
21
|
-
* @param pluginName - Plugin identifier
|
|
22
|
-
* @param schema - Drizzle schema object
|
|
23
|
-
*/
|
|
24
|
-
registerSchema(pluginName: string, schema: any): void;
|
|
25
|
-
/**
|
|
26
|
-
* Run migrations for all registered plugins
|
|
27
|
-
* @param options - Migration options
|
|
28
|
-
* @param options.verbose - Log detailed output (default: true in dev, false in prod)
|
|
29
|
-
* @param options.force - Allow destructive migrations
|
|
30
|
-
* @param options.dryRun - Preview changes without applying
|
|
31
|
-
* @throws Error if any migration fails or destructive changes blocked
|
|
32
|
-
*/
|
|
33
|
-
runAllPluginMigrations(options?: {
|
|
34
|
-
verbose?: boolean;
|
|
35
|
-
force?: boolean;
|
|
36
|
-
dryRun?: boolean;
|
|
37
|
-
}): Promise<void>;
|
|
38
|
-
/**
|
|
39
|
-
* Get the runtime migrator instance for advanced operations
|
|
40
|
-
* @returns RuntimeMigrator instance or null if not initialized
|
|
41
|
-
*/
|
|
42
|
-
getMigrator(): RuntimeMigrator | null;
|
|
43
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type IDatabaseAdapter } from '@elizaos/core';
|
|
2
|
-
/**
|
|
3
|
-
* TEMPORARY MIGRATION: develop → feat/entity-rls migration
|
|
4
|
-
*
|
|
5
|
-
* This migration runs automatically on startup and is idempotent.
|
|
6
|
-
* It handles the migration from Owner RLS to Server RLS + Entity RLS, including:
|
|
7
|
-
* - Disabling old RLS policies temporarily
|
|
8
|
-
* - Renaming server_id → message_server_id in channels, worlds, rooms
|
|
9
|
-
* - Converting TEXT → UUID where needed
|
|
10
|
-
* - Dropping old server_id columns for RLS
|
|
11
|
-
* - Cleaning up indexes
|
|
12
|
-
*
|
|
13
|
-
* @param adapter - Database adapter
|
|
14
|
-
*/
|
|
15
|
-
export declare function migrateToEntityRLS(adapter: IDatabaseAdapter): Promise<void>;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { type UUID, Agent, Entity, Memory, Component } from '@elizaos/core';
|
|
2
|
-
import { BaseDrizzleAdapter } from '../base';
|
|
3
|
-
import { type EmbeddingDimensionColumn } from '../schema/embedding';
|
|
4
|
-
import type { PostgresConnectionManager } from './manager';
|
|
5
|
-
/**
|
|
6
|
-
* Adapter class for interacting with a PostgreSQL database.
|
|
7
|
-
* Extends BaseDrizzleAdapter.
|
|
8
|
-
*/
|
|
9
|
-
export declare class PgDatabaseAdapter extends BaseDrizzleAdapter {
|
|
10
|
-
protected embeddingDimension: EmbeddingDimensionColumn;
|
|
11
|
-
private manager;
|
|
12
|
-
constructor(agentId: UUID, manager: PostgresConnectionManager, _schema?: any);
|
|
13
|
-
getManager(): PostgresConnectionManager;
|
|
14
|
-
/**
|
|
15
|
-
* Execute a callback with entity context for Entity RLS
|
|
16
|
-
* Delegates to the manager's withEntityContext method
|
|
17
|
-
*
|
|
18
|
-
* This is a public method because it's part of the adapter's public API
|
|
19
|
-
* for operations that need entity-scoped database access.
|
|
20
|
-
*/
|
|
21
|
-
withEntityContext<T>(entityId: UUID | null, callback: (tx: any) => Promise<T>): Promise<T>;
|
|
22
|
-
getEntityByIds(entityIds: UUID[]): Promise<Entity[] | null>;
|
|
23
|
-
getMemoriesByServerId(_params: {
|
|
24
|
-
serverId: UUID;
|
|
25
|
-
count?: number;
|
|
26
|
-
}): Promise<Memory[]>;
|
|
27
|
-
ensureAgentExists(agent: Partial<Agent>): Promise<Agent>;
|
|
28
|
-
/**
|
|
29
|
-
* Executes the provided operation with a database connection.
|
|
30
|
-
*
|
|
31
|
-
* @template T
|
|
32
|
-
* @param {() => Promise<T>} operation - The operation to be executed with the database connection.
|
|
33
|
-
* @returns {Promise<T>} A promise that resolves with the result of the operation.
|
|
34
|
-
*/
|
|
35
|
-
protected withDatabase<T>(operation: () => Promise<T>): Promise<T>;
|
|
36
|
-
/**
|
|
37
|
-
* Asynchronously initializes the PgDatabaseAdapter by running migrations using the manager.
|
|
38
|
-
* Logs a success message if initialization is successful, otherwise logs an error message.
|
|
39
|
-
*
|
|
40
|
-
* @returns {Promise<void>} A promise that resolves when initialization is complete.
|
|
41
|
-
*/
|
|
42
|
-
init(): Promise<void>;
|
|
43
|
-
/**
|
|
44
|
-
* Checks if the database connection is ready and active.
|
|
45
|
-
* @returns {Promise<boolean>} A Promise that resolves to true if the connection is healthy.
|
|
46
|
-
*/
|
|
47
|
-
isReady(): Promise<boolean>;
|
|
48
|
-
/**
|
|
49
|
-
* Asynchronously closes the manager associated with this instance.
|
|
50
|
-
*
|
|
51
|
-
* @returns A Promise that resolves once the manager is closed.
|
|
52
|
-
*/
|
|
53
|
-
close(): Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
* Asynchronously retrieves the connection from the manager.
|
|
56
|
-
*
|
|
57
|
-
* @returns {Promise<Pool>} A Promise that resolves with the connection.
|
|
58
|
-
*/
|
|
59
|
-
getConnection(): Promise<import("pg").Pool>;
|
|
60
|
-
createAgent(agent: Agent): Promise<boolean>;
|
|
61
|
-
getAgent(agentId: UUID): Promise<Agent | null>;
|
|
62
|
-
updateAgent(agentId: UUID, agent: Partial<Agent>): Promise<boolean>;
|
|
63
|
-
deleteAgent(agentId: UUID): Promise<boolean>;
|
|
64
|
-
createEntities(entities: Entity[]): Promise<boolean>;
|
|
65
|
-
getEntitiesByIds(entityIds: UUID[]): Promise<Entity[]>;
|
|
66
|
-
updateEntity(entity: Entity): Promise<void>;
|
|
67
|
-
createMemory(memory: Memory, tableName: string): Promise<UUID>;
|
|
68
|
-
getMemoryById(memoryId: UUID): Promise<Memory | null>;
|
|
69
|
-
searchMemories(params: any): Promise<any[]>;
|
|
70
|
-
updateMemory(memory: Partial<Memory> & {
|
|
71
|
-
id: UUID;
|
|
72
|
-
}): Promise<boolean>;
|
|
73
|
-
deleteMemory(memoryId: UUID): Promise<void>;
|
|
74
|
-
createComponent(component: Component): Promise<boolean>;
|
|
75
|
-
getComponent(entityId: UUID, type: string, worldId?: UUID, sourceEntityId?: UUID): Promise<Component | null>;
|
|
76
|
-
updateComponent(component: Component): Promise<void>;
|
|
77
|
-
deleteComponent(componentId: UUID): Promise<void>;
|
|
78
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { type NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
2
|
-
import { Pool, type PoolClient } from 'pg';
|
|
3
|
-
import { type UUID } from '@elizaos/core';
|
|
4
|
-
export declare class PostgresConnectionManager {
|
|
5
|
-
private pool;
|
|
6
|
-
private db;
|
|
7
|
-
constructor(connectionString: string, rlsServerId?: string);
|
|
8
|
-
getDatabase(): NodePgDatabase;
|
|
9
|
-
getConnection(): Pool;
|
|
10
|
-
getClient(): Promise<PoolClient>;
|
|
11
|
-
testConnection(): Promise<boolean>;
|
|
12
|
-
/**
|
|
13
|
-
* Execute a query with entity context for Entity RLS.
|
|
14
|
-
* Sets app.entity_id before executing the callback.
|
|
15
|
-
*
|
|
16
|
-
* Server RLS context (if enabled) is already set via Pool's application_name.
|
|
17
|
-
*
|
|
18
|
-
* If Entity RLS is not installed (ENABLE_DATA_ISOLATION=false), this method
|
|
19
|
-
* gracefully degrades to executing the callback without setting entity context.
|
|
20
|
-
*
|
|
21
|
-
* @param entityId - The entity UUID to set as context (or null for server operations)
|
|
22
|
-
* @param callback - The database operations to execute with the entity context
|
|
23
|
-
* @returns The result of the callback
|
|
24
|
-
* @throws {Error} If the callback fails or if there's a critical Entity RLS configuration issue
|
|
25
|
-
*/
|
|
26
|
-
withEntityContext<T>(entityId: UUID | null, callback: (tx: NodePgDatabase) => Promise<T>): Promise<T>;
|
|
27
|
-
/**
|
|
28
|
-
* Closes the connection pool.
|
|
29
|
-
* @returns {Promise<void>}
|
|
30
|
-
* @memberof PostgresConnectionManager
|
|
31
|
-
*/
|
|
32
|
-
close(): Promise<void>;
|
|
33
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { type UUID, type Agent, type Entity, type Memory } from '@elizaos/core';
|
|
2
|
-
import { BaseDrizzleAdapter } from '../base';
|
|
3
|
-
import { type EmbeddingDimensionColumn } from '../schema/embedding';
|
|
4
|
-
import type { PGliteClientManager } from './manager';
|
|
5
|
-
/**
|
|
6
|
-
* PgliteDatabaseAdapter class represents an adapter for interacting with a PgliteDatabase.
|
|
7
|
-
* Extends BaseDrizzleAdapter.
|
|
8
|
-
*
|
|
9
|
-
* @constructor
|
|
10
|
-
* @param {UUID} agentId - The ID of the agent.
|
|
11
|
-
* @param {PGliteClientManager} manager - The manager for the Pglite client.
|
|
12
|
-
*
|
|
13
|
-
* @method withDatabase
|
|
14
|
-
* @param {() => Promise<T>} operation - The operation to perform on the database.
|
|
15
|
-
* @return {Promise<T>} - The result of the operation.
|
|
16
|
-
*
|
|
17
|
-
* @method init
|
|
18
|
-
* @return {Promise<void>} - A Promise that resolves when the initialization is complete.
|
|
19
|
-
*
|
|
20
|
-
* @method close
|
|
21
|
-
* @return {void} - A Promise that resolves when the database is closed.
|
|
22
|
-
*/
|
|
23
|
-
export declare class PgliteDatabaseAdapter extends BaseDrizzleAdapter {
|
|
24
|
-
private manager;
|
|
25
|
-
protected embeddingDimension: EmbeddingDimensionColumn;
|
|
26
|
-
/**
|
|
27
|
-
* Constructor for creating an instance of a class.
|
|
28
|
-
* @param {UUID} agentId - The unique identifier for the agent.
|
|
29
|
-
* @param {PGliteClientManager} manager - The manager for the Pglite client.
|
|
30
|
-
*/
|
|
31
|
-
constructor(agentId: UUID, manager: PGliteClientManager);
|
|
32
|
-
/**
|
|
33
|
-
* Execute a callback with entity context for Entity RLS
|
|
34
|
-
* PGLite: No RLS support, just execute the callback in a simple transaction
|
|
35
|
-
*
|
|
36
|
-
* This is a public method because it's part of the adapter's public API
|
|
37
|
-
* for operations that need entity-scoped database access.
|
|
38
|
-
*/
|
|
39
|
-
withEntityContext<T>(_entityId: UUID | null, callback: (tx: any) => Promise<T>): Promise<T>;
|
|
40
|
-
getEntityByIds(entityIds: UUID[]): Promise<Entity[] | null>;
|
|
41
|
-
getMemoriesByServerId(_params: {
|
|
42
|
-
serverId: UUID;
|
|
43
|
-
count?: number;
|
|
44
|
-
}): Promise<Memory[]>;
|
|
45
|
-
ensureAgentExists(agent: Partial<Agent>): Promise<Agent>;
|
|
46
|
-
/**
|
|
47
|
-
* Asynchronously runs the provided database operation while checking if the database is currently shutting down.
|
|
48
|
-
* If the database is shutting down, a warning is logged and null is returned.
|
|
49
|
-
*
|
|
50
|
-
* @param {Function} operation - The database operation to be performed.
|
|
51
|
-
* @returns {Promise<T>} A promise that resolves with the result of the database operation.
|
|
52
|
-
*/
|
|
53
|
-
protected withDatabase<T>(operation: () => Promise<T>): Promise<T>;
|
|
54
|
-
/**
|
|
55
|
-
* Asynchronously initializes the database by running migrations.
|
|
56
|
-
*
|
|
57
|
-
* @returns {Promise<void>} A Promise that resolves when the database initialization is complete.
|
|
58
|
-
*/
|
|
59
|
-
init(): Promise<void>;
|
|
60
|
-
/**
|
|
61
|
-
* Checks if the database connection is ready and active.
|
|
62
|
-
* For PGLite, this checks if the client is not in a shutting down state.
|
|
63
|
-
* @returns {Promise<boolean>} A Promise that resolves to true if the connection is healthy.
|
|
64
|
-
*/
|
|
65
|
-
isReady(): Promise<boolean>;
|
|
66
|
-
/**
|
|
67
|
-
* Asynchronously closes the database.
|
|
68
|
-
*/
|
|
69
|
-
close(): Promise<void>;
|
|
70
|
-
/**
|
|
71
|
-
* Asynchronously retrieves the connection from the client.
|
|
72
|
-
*
|
|
73
|
-
* @returns {Promise<PGlite>} A Promise that resolves with the connection.
|
|
74
|
-
*/
|
|
75
|
-
getConnection(): Promise<import("@electric-sql/pglite").PGlite>;
|
|
76
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { PGlite, type PGliteOptions } from '@electric-sql/pglite';
|
|
2
|
-
import type { IDatabaseClientManager } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Class representing a database client manager for PGlite.
|
|
5
|
-
* @implements { IDatabaseClientManager }
|
|
6
|
-
*/
|
|
7
|
-
export declare class PGliteClientManager implements IDatabaseClientManager<PGlite> {
|
|
8
|
-
private client;
|
|
9
|
-
private shuttingDown;
|
|
10
|
-
/**
|
|
11
|
-
* Constructor for creating a new instance of PGlite with the provided options.
|
|
12
|
-
* Initializes the PGlite client with additional extensions.
|
|
13
|
-
* @param {PGliteOptions} options - The options to configure the PGlite client.
|
|
14
|
-
*/
|
|
15
|
-
constructor(options: PGliteOptions);
|
|
16
|
-
getConnection(): PGlite;
|
|
17
|
-
isShuttingDown(): boolean;
|
|
18
|
-
initialize(): Promise<void>;
|
|
19
|
-
close(): Promise<void>;
|
|
20
|
-
private setupShutdownHandlers;
|
|
21
|
-
}
|
package/dist/node/src/rls.d.ts
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { type IDatabaseAdapter } from '@elizaos/core';
|
|
2
|
-
/**
|
|
3
|
-
* PostgreSQL Row-Level Security (RLS) for Multi-Server and Entity Isolation
|
|
4
|
-
*
|
|
5
|
-
* This module provides two layers of database-level security:
|
|
6
|
-
*
|
|
7
|
-
* 1. **Server RLS** - Multi-server isolation
|
|
8
|
-
* - Isolates data between different ElizaOS server instances
|
|
9
|
-
* - Uses `server_id` column added dynamically to all tables
|
|
10
|
-
* - Server context set via PostgreSQL `application_name` connection parameter
|
|
11
|
-
* - Prevents data leakage between different deployments/environments
|
|
12
|
-
*
|
|
13
|
-
* 2. **Entity RLS** - User/agent-level privacy isolation
|
|
14
|
-
* - Isolates data between different users (Clients (plugins/API) users)
|
|
15
|
-
* - Uses `entity_id`, `author_id`, or joins via `participants` table
|
|
16
|
-
* - Entity context set via `app.entity_id` transaction-local variable
|
|
17
|
-
* - Provides DM privacy and multi-user isolation within a server
|
|
18
|
-
*
|
|
19
|
-
* CRITICAL SECURITY REQUIREMENTS:
|
|
20
|
-
* - RLS policies DO NOT apply to PostgreSQL superuser accounts
|
|
21
|
-
* - Use a REGULAR (non-superuser) database user
|
|
22
|
-
* - Grant only necessary permissions (CREATE, SELECT, INSERT, UPDATE, DELETE)
|
|
23
|
-
* - NEVER use the 'postgres' superuser or any superuser account
|
|
24
|
-
* - Superusers bypass ALL RLS policies by design, defeating the isolation mechanism
|
|
25
|
-
*
|
|
26
|
-
* ARCHITECTURE:
|
|
27
|
-
* - Server RLS: Uses PostgreSQL `application_name` (set at connection pool level)
|
|
28
|
-
* - Entity RLS: Uses `SET LOCAL app.entity_id` (set per transaction)
|
|
29
|
-
* - Policies use FORCE ROW LEVEL SECURITY to enforce even for table owners
|
|
30
|
-
* - Automatic index creation for performance (`server_id`, `entity_id`, `room_id`)
|
|
31
|
-
*
|
|
32
|
-
* @module rls
|
|
33
|
-
*/
|
|
34
|
-
/**
|
|
35
|
-
* Install PostgreSQL functions required for Server RLS and Entity RLS
|
|
36
|
-
*
|
|
37
|
-
* This function creates all necessary PostgreSQL stored procedures for both
|
|
38
|
-
* Server RLS (multi-server isolation) and Entity RLS (user privacy isolation).
|
|
39
|
-
*
|
|
40
|
-
* **Server RLS Functions Created:**
|
|
41
|
-
* - `current_server_id()` - Returns server UUID from `application_name`
|
|
42
|
-
* - `add_server_isolation(schema, table)` - Adds Server RLS to a single table
|
|
43
|
-
* - `apply_rls_to_all_tables()` - Applies Server RLS to all eligible tables
|
|
44
|
-
*
|
|
45
|
-
* **Entity RLS Functions Created:**
|
|
46
|
-
* - `current_entity_id()` - Returns entity UUID from `app.entity_id` session variable
|
|
47
|
-
* - `add_entity_isolation(schema, table)` - Adds Entity RLS to a single table
|
|
48
|
-
* - `apply_entity_rls_to_all_tables()` - Applies Entity RLS to all eligible tables
|
|
49
|
-
*
|
|
50
|
-
* **Security Model:**
|
|
51
|
-
* - Server RLS: Isolation between different ElizaOS instances (environments/deployments)
|
|
52
|
-
* - Entity RLS: Isolation between different users within a server instance
|
|
53
|
-
* - Both layers stack - a user can only see data from their server AND their accessible entities
|
|
54
|
-
*
|
|
55
|
-
* **Important Notes:**
|
|
56
|
-
* - Must be called before `applyRLSToNewTables()` or `applyEntityRLSToAllTables()`
|
|
57
|
-
* - Creates `servers` table if it doesn't exist
|
|
58
|
-
* - Automatically calls `installEntityRLS()` to set up both layers
|
|
59
|
-
* - Uses `%I` identifier quoting in format() to prevent SQL injection
|
|
60
|
-
* - Policies use FORCE RLS to enforce even for table owners
|
|
61
|
-
*
|
|
62
|
-
* @param adapter - Database adapter with access to the Drizzle ORM instance
|
|
63
|
-
* @returns Promise that resolves when all RLS functions are installed
|
|
64
|
-
* @throws {Error} If database connection fails or SQL execution fails
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* ```typescript
|
|
68
|
-
* // Install RLS functions on server startup
|
|
69
|
-
* await installRLSFunctions(database);
|
|
70
|
-
* await getOrCreateRlsServer(database, serverId);
|
|
71
|
-
* await setServerContext(database, serverId);
|
|
72
|
-
* await applyRLSToNewTables(database);
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
export declare function installRLSFunctions(adapter: IDatabaseAdapter): Promise<void>;
|
|
76
|
-
/**
|
|
77
|
-
* Get or create RLS server using Drizzle ORM
|
|
78
|
-
*/
|
|
79
|
-
export declare function getOrCreateRlsServer(adapter: IDatabaseAdapter, serverId: string): Promise<string>;
|
|
80
|
-
/**
|
|
81
|
-
* Set RLS context on PostgreSQL connection pool
|
|
82
|
-
* This function validates that the server exists and has correct UUID format
|
|
83
|
-
*/
|
|
84
|
-
export declare function setServerContext(adapter: IDatabaseAdapter, serverId: string): Promise<void>;
|
|
85
|
-
/**
|
|
86
|
-
* Assign agent to server using Drizzle ORM
|
|
87
|
-
*/
|
|
88
|
-
export declare function assignAgentToServer(adapter: IDatabaseAdapter, agentId: string, serverId: string): Promise<void>;
|
|
89
|
-
/**
|
|
90
|
-
* Apply RLS to all tables by calling PostgreSQL function
|
|
91
|
-
*/
|
|
92
|
-
export declare function applyRLSToNewTables(adapter: IDatabaseAdapter): Promise<void>;
|
|
93
|
-
/**
|
|
94
|
-
* Disable RLS globally
|
|
95
|
-
* SIMPLE APPROACH:
|
|
96
|
-
* - Disables RLS for ALL server instances
|
|
97
|
-
* - Keeps server_id columns and data intact
|
|
98
|
-
* - Use only in development or when migrating to single-server mode
|
|
99
|
-
*/
|
|
100
|
-
export declare function uninstallRLS(adapter: IDatabaseAdapter): Promise<void>;
|
|
101
|
-
/**
|
|
102
|
-
* Install Entity RLS functions for user privacy isolation
|
|
103
|
-
*
|
|
104
|
-
* This provides database-level privacy between different entities (client users: Plugins/API)
|
|
105
|
-
* interacting with agents, independent of JWT authentication.
|
|
106
|
-
*
|
|
107
|
-
* **How Entity RLS Works:**
|
|
108
|
-
* - Each database transaction sets `app.entity_id` before querying
|
|
109
|
-
* - Policies filter rows based on entity ownership or participant membership
|
|
110
|
-
* - Two isolation strategies:
|
|
111
|
-
* 1. Direct ownership: `entity_id` or `author_id` column matches `current_entity_id()`
|
|
112
|
-
* 2. Shared access: `room_id`/`channel_id` exists in `participants` table for the entity
|
|
113
|
-
*
|
|
114
|
-
* **Performance Considerations:**
|
|
115
|
-
* - **Subquery policies** (for `room_id`/`channel_id`) run on EVERY row access
|
|
116
|
-
* - Indexes are automatically created on: `entity_id`, `author_id`, `room_id`, `channel_id`
|
|
117
|
-
* - The `participants` table should have an index on `(entity_id, channel_id)`
|
|
118
|
-
* - For large datasets (>1M rows), consider:
|
|
119
|
-
* - Materialized views for frequently accessed entity-filtered data
|
|
120
|
-
* - Partitioning large tables by date or entity_id
|
|
121
|
-
*
|
|
122
|
-
* **Optimization Tips:**
|
|
123
|
-
* - Direct column policies (`entity_id = current_entity_id()`) are faster than subquery policies
|
|
124
|
-
* - The `participants` lookup is cached per transaction but still requires index scans
|
|
125
|
-
*
|
|
126
|
-
* **Tables Excluded from Entity RLS:**
|
|
127
|
-
* - `servers` - Server RLS table
|
|
128
|
-
* - `users` - Authentication (no entity isolation)
|
|
129
|
-
* - `entity_mappings` - Cross-platform entity mapping
|
|
130
|
-
* - `drizzle_migrations`, `__drizzle_migrations` - Migration tracking
|
|
131
|
-
*
|
|
132
|
-
* @param adapter - Database adapter with access to the Drizzle ORM instance
|
|
133
|
-
* @returns Promise that resolves when Entity RLS functions are installed
|
|
134
|
-
* @throws {Error} If database connection fails or SQL execution fails
|
|
135
|
-
*
|
|
136
|
-
* @example
|
|
137
|
-
* ```typescript
|
|
138
|
-
* // Called automatically by installRLSFunctions()
|
|
139
|
-
* await installRLSFunctions(database);
|
|
140
|
-
*
|
|
141
|
-
* // Or call separately if needed
|
|
142
|
-
* await installEntityRLS(database);
|
|
143
|
-
* await applyEntityRLSToAllTables(database);
|
|
144
|
-
* ```
|
|
145
|
-
*/
|
|
146
|
-
export declare function installEntityRLS(adapter: IDatabaseAdapter): Promise<void>;
|
|
147
|
-
/**
|
|
148
|
-
* Apply Entity RLS policies to all eligible tables
|
|
149
|
-
* Call this after installEntityRLS() to activate the policies
|
|
150
|
-
*/
|
|
151
|
-
export declare function applyEntityRLSToAllTables(adapter: IDatabaseAdapter): Promise<void>;
|
|
152
|
-
/**
|
|
153
|
-
* Remove Entity RLS (for rollback or testing)
|
|
154
|
-
* Drops entity RLS functions and policies but keeps server RLS intact
|
|
155
|
-
*/
|
|
156
|
-
export declare function uninstallEntityRLS(adapter: IDatabaseAdapter): Promise<void>;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { DrizzleDB, SchemaSnapshot } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Introspect the current database state and generate a snapshot
|
|
4
|
-
* This is used when no previous snapshot exists for a plugin
|
|
5
|
-
* to capture the existing database state before migrations
|
|
6
|
-
*/
|
|
7
|
-
export declare class DatabaseIntrospector {
|
|
8
|
-
private db;
|
|
9
|
-
constructor(db: DrizzleDB);
|
|
10
|
-
/**
|
|
11
|
-
* Introspect all tables in the database and generate a snapshot
|
|
12
|
-
* @param schemaName - Schema to introspect (default: 'public')
|
|
13
|
-
* @returns Schema snapshot of current database state
|
|
14
|
-
*/
|
|
15
|
-
introspectSchema(schemaName?: string): Promise<SchemaSnapshot>;
|
|
16
|
-
/**
|
|
17
|
-
* Get all tables in a schema
|
|
18
|
-
*/
|
|
19
|
-
private getTables;
|
|
20
|
-
/**
|
|
21
|
-
* Get columns for a table
|
|
22
|
-
*/
|
|
23
|
-
private getColumns;
|
|
24
|
-
/**
|
|
25
|
-
* Get indexes for a table
|
|
26
|
-
*/
|
|
27
|
-
private getIndexes;
|
|
28
|
-
/**
|
|
29
|
-
* Get foreign keys for a table
|
|
30
|
-
*/
|
|
31
|
-
private getForeignKeys;
|
|
32
|
-
/**
|
|
33
|
-
* Get primary keys for a table
|
|
34
|
-
*/
|
|
35
|
-
private getPrimaryKeys;
|
|
36
|
-
/**
|
|
37
|
-
* Get unique constraints for a table
|
|
38
|
-
*/
|
|
39
|
-
private getUniqueConstraints;
|
|
40
|
-
/**
|
|
41
|
-
* Get check constraints for a table
|
|
42
|
-
*/
|
|
43
|
-
private getCheckConstraints;
|
|
44
|
-
/**
|
|
45
|
-
* Get enums in a schema
|
|
46
|
-
*/
|
|
47
|
-
private getEnums;
|
|
48
|
-
/**
|
|
49
|
-
* Parse default value for a column
|
|
50
|
-
*/
|
|
51
|
-
private parseDefault;
|
|
52
|
-
/**
|
|
53
|
-
* Check if tables exist for a plugin by checking if any tables exist in its schema
|
|
54
|
-
* @param pluginName - Name of the plugin
|
|
55
|
-
* @returns True if tables exist, false otherwise
|
|
56
|
-
*/
|
|
57
|
-
hasExistingTables(pluginName: string): Promise<boolean>;
|
|
58
|
-
/**
|
|
59
|
-
* Derive schema name from plugin name
|
|
60
|
-
*/
|
|
61
|
-
private deriveSchemaName;
|
|
62
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { SchemaSnapshot } from '../types';
|
|
2
|
-
export interface SchemaDiff {
|
|
3
|
-
tables: {
|
|
4
|
-
created: string[];
|
|
5
|
-
deleted: string[];
|
|
6
|
-
modified: Array<{
|
|
7
|
-
name: string;
|
|
8
|
-
changes: any;
|
|
9
|
-
}>;
|
|
10
|
-
};
|
|
11
|
-
columns: {
|
|
12
|
-
added: Array<{
|
|
13
|
-
table: string;
|
|
14
|
-
column: string;
|
|
15
|
-
definition: any;
|
|
16
|
-
}>;
|
|
17
|
-
deleted: Array<{
|
|
18
|
-
table: string;
|
|
19
|
-
column: string;
|
|
20
|
-
}>;
|
|
21
|
-
modified: Array<{
|
|
22
|
-
table: string;
|
|
23
|
-
column: string;
|
|
24
|
-
changes: any;
|
|
25
|
-
}>;
|
|
26
|
-
};
|
|
27
|
-
indexes: {
|
|
28
|
-
created: any[];
|
|
29
|
-
deleted: any[];
|
|
30
|
-
altered: Array<{
|
|
31
|
-
old: any;
|
|
32
|
-
new: any;
|
|
33
|
-
}>;
|
|
34
|
-
};
|
|
35
|
-
foreignKeys: {
|
|
36
|
-
created: any[];
|
|
37
|
-
deleted: any[];
|
|
38
|
-
altered: Array<{
|
|
39
|
-
old: any;
|
|
40
|
-
new: any;
|
|
41
|
-
}>;
|
|
42
|
-
};
|
|
43
|
-
uniqueConstraints: {
|
|
44
|
-
created: any[];
|
|
45
|
-
deleted: any[];
|
|
46
|
-
};
|
|
47
|
-
checkConstraints: {
|
|
48
|
-
created: any[];
|
|
49
|
-
deleted: any[];
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Calculate the difference between two snapshots
|
|
54
|
-
*/
|
|
55
|
-
export declare function calculateDiff(previousSnapshot: SchemaSnapshot | null, currentSnapshot: SchemaSnapshot): Promise<SchemaDiff>;
|
|
56
|
-
/**
|
|
57
|
-
* Check if a diff has any changes
|
|
58
|
-
*/
|
|
59
|
-
export declare function hasDiffChanges(diff: SchemaDiff): boolean;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { SchemaSnapshot } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Generate a snapshot from a Drizzle schema
|
|
4
|
-
* This is a port of Drizzle's pgSerializer.generatePgSnapshot
|
|
5
|
-
*/
|
|
6
|
-
export declare function generateSnapshot(schema: any): Promise<SchemaSnapshot>;
|
|
7
|
-
/**
|
|
8
|
-
* Calculate hash of a snapshot for change detection
|
|
9
|
-
*/
|
|
10
|
-
export declare function hashSnapshot(snapshot: SchemaSnapshot): string;
|
|
11
|
-
/**
|
|
12
|
-
* Create an empty snapshot for initial migration
|
|
13
|
-
*/
|
|
14
|
-
export declare function createEmptySnapshot(): SchemaSnapshot;
|
|
15
|
-
/**
|
|
16
|
-
* Compare two snapshots and detect if there are changes
|
|
17
|
-
*/
|
|
18
|
-
export declare function hasChanges(previousSnapshot: SchemaSnapshot | null, currentSnapshot: SchemaSnapshot): boolean;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { SchemaSnapshot } from '../types';
|
|
2
|
-
import type { SchemaDiff } from './diff-calculator';
|
|
3
|
-
/**
|
|
4
|
-
* Data loss detection result
|
|
5
|
-
* Based on Drizzle's pgPushUtils approach
|
|
6
|
-
*/
|
|
7
|
-
export interface DataLossCheck {
|
|
8
|
-
hasDataLoss: boolean;
|
|
9
|
-
tablesToRemove: string[];
|
|
10
|
-
columnsToRemove: string[];
|
|
11
|
-
tablesToTruncate: string[];
|
|
12
|
-
typeChanges: Array<{
|
|
13
|
-
table: string;
|
|
14
|
-
column: string;
|
|
15
|
-
from: string;
|
|
16
|
-
to: string;
|
|
17
|
-
}>;
|
|
18
|
-
warnings: string[];
|
|
19
|
-
requiresConfirmation: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Check for potential data loss in schema changes
|
|
23
|
-
* Based on Drizzle's pgSuggestions function
|
|
24
|
-
*/
|
|
25
|
-
export declare function checkForDataLoss(diff: SchemaDiff): DataLossCheck;
|
|
26
|
-
/**
|
|
27
|
-
* Generate SQL statements from a schema diff
|
|
28
|
-
* This follows Drizzle's approach: create all tables first, then add foreign keys
|
|
29
|
-
*/
|
|
30
|
-
export declare function generateMigrationSQL(previousSnapshot: SchemaSnapshot | null, currentSnapshot: SchemaSnapshot, diff?: SchemaDiff): Promise<string[]>;
|
|
31
|
-
/**
|
|
32
|
-
* Generate SQL for renaming a table
|
|
33
|
-
*/
|
|
34
|
-
export declare function generateRenameTableSQL(oldName: string, newName: string): string;
|
|
35
|
-
/**
|
|
36
|
-
* Generate SQL for renaming a column
|
|
37
|
-
*/
|
|
38
|
-
export declare function generateRenameColumnSQL(table: string, oldName: string, newName: string): string;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { RuntimeMigrator } from './runtime-migrator';
|
|
2
|
-
export * from './types';
|
|
3
|
-
export { MigrationTracker } from './storage/migration-tracker';
|
|
4
|
-
export { JournalStorage } from './storage/journal-storage';
|
|
5
|
-
export { SnapshotStorage } from './storage/snapshot-storage';
|
|
6
|
-
export { generateSnapshot, hashSnapshot, createEmptySnapshot, hasChanges, } from './drizzle-adapters/snapshot-generator';
|
|
7
|
-
export { calculateDiff, hasDiffChanges, type SchemaDiff } from './drizzle-adapters/diff-calculator';
|
|
8
|
-
export { generateMigrationSQL, generateRenameTableSQL, generateRenameColumnSQL, } from './drizzle-adapters/sql-generator';
|