@axiom-lattice/pg-stores 1.0.93 → 2.0.0
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +32 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/migrations/add_project_folder_path.ts +27 -0
- package/src/migrations/drop_project_folder_path.ts +27 -0
- package/src/stores/PostgreSQLProjectStore.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axiom-lattice/pg-stores",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "PG stores implementation for Axiom Lattice framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@langchain/core": "1.1.30",
|
|
26
26
|
"pg": "^8.16.3",
|
|
27
27
|
"uuid": "^9.0.1",
|
|
28
|
-
"@axiom-lattice/core": "
|
|
29
|
-
"@axiom-lattice/protocols": "
|
|
28
|
+
"@axiom-lattice/core": "3.0.0",
|
|
29
|
+
"@axiom-lattice/protocols": "3.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/jest": "^29.5.14",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration: Add folder_path column to lattice_projects
|
|
3
|
+
*
|
|
4
|
+
* Adds an optional folder_path TEXT column to store the local filesystem
|
|
5
|
+
* path for the project root directory. Used by FilesystemBackend when
|
|
6
|
+
* the project has a local folder configured.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PoolClient } from "pg";
|
|
10
|
+
import { Migration } from "./migration";
|
|
11
|
+
|
|
12
|
+
export const addProjectFolderPathColumn: Migration = {
|
|
13
|
+
version: 25,
|
|
14
|
+
name: "add_project_folder_path_column",
|
|
15
|
+
up: async (client: PoolClient) => {
|
|
16
|
+
await client.query(`
|
|
17
|
+
ALTER TABLE lattice_projects
|
|
18
|
+
ADD COLUMN IF NOT EXISTS folder_path TEXT
|
|
19
|
+
`);
|
|
20
|
+
},
|
|
21
|
+
down: async (client: PoolClient) => {
|
|
22
|
+
await client.query(`
|
|
23
|
+
ALTER TABLE lattice_projects
|
|
24
|
+
DROP COLUMN IF EXISTS folder_path
|
|
25
|
+
`);
|
|
26
|
+
},
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration: Remove folder_path column from lattice_projects
|
|
3
|
+
*
|
|
4
|
+
* Removes the optional folder_path TEXT column from lattice_projects.
|
|
5
|
+
* This column stored a local filesystem path for project root directories
|
|
6
|
+
* and was used by the A2A working directory feature that has been removed.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PoolClient } from "pg";
|
|
10
|
+
import { Migration } from "./migration";
|
|
11
|
+
|
|
12
|
+
export const dropProjectFolderPathColumn: Migration = {
|
|
13
|
+
version: 162,
|
|
14
|
+
name: "drop_project_folder_path_column",
|
|
15
|
+
up: async (client: PoolClient) => {
|
|
16
|
+
await client.query(`
|
|
17
|
+
ALTER TABLE lattice_projects
|
|
18
|
+
DROP COLUMN IF EXISTS folder_path
|
|
19
|
+
`);
|
|
20
|
+
},
|
|
21
|
+
down: async (client: PoolClient) => {
|
|
22
|
+
await client.query(`
|
|
23
|
+
ALTER TABLE lattice_projects
|
|
24
|
+
ADD COLUMN IF NOT EXISTS folder_path TEXT
|
|
25
|
+
`);
|
|
26
|
+
},
|
|
27
|
+
};
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import { MigrationManager } from "../migrations/migration";
|
|
14
14
|
import { createProjectsTable } from "../migrations/project_migrations";
|
|
15
15
|
import { addProjectConfigColumn } from "../migrations/add_project_config_column";
|
|
16
|
+
import { dropProjectFolderPathColumn } from "../migrations/drop_project_folder_path";
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* PostgreSQL ProjectStore options
|
|
@@ -67,6 +68,7 @@ export class PostgreSQLProjectStore implements ProjectStore {
|
|
|
67
68
|
this.migrationManager = new MigrationManager(this.pool);
|
|
68
69
|
this.migrationManager.register(createProjectsTable);
|
|
69
70
|
this.migrationManager.register(addProjectConfigColumn);
|
|
71
|
+
this.migrationManager.register(dropProjectFolderPathColumn);
|
|
70
72
|
|
|
71
73
|
// Auto-migrate by default
|
|
72
74
|
if (options.autoMigrate !== false) {
|