@axiom-lattice/pg-stores 1.0.65 → 1.0.66
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 +6 -0
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/migrations/add_custom_run_config_column.ts +1 -1
- package/src/migrations/assistant_pk_migration.ts +1 -1
- package/src/migrations/database_config_migrations.ts +1 -1
- package/src/migrations/thread_tenant_migration.ts +1 -1
- package/src/migrations/user_status_migration.ts +1 -1
- package/src/stores/PostgreSQLEvalStore.ts +1 -1
- package/src/stores/PostgreSQLSkillStore.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -180,7 +180,7 @@ var createThreadsTable = {
|
|
|
180
180
|
|
|
181
181
|
// src/migrations/thread_tenant_migration.ts
|
|
182
182
|
var addThreadTenantId = {
|
|
183
|
-
version:
|
|
183
|
+
version: 23,
|
|
184
184
|
name: "add_thread_tenant_id",
|
|
185
185
|
up: async (client) => {
|
|
186
186
|
await client.query(`
|
|
@@ -539,7 +539,7 @@ var addAssistantTenantId = {
|
|
|
539
539
|
|
|
540
540
|
// src/migrations/assistant_pk_migration.ts
|
|
541
541
|
var changeAssistantPrimaryKey = {
|
|
542
|
-
version:
|
|
542
|
+
version: 112,
|
|
543
543
|
name: "change_assistant_primary_key",
|
|
544
544
|
up: async (client) => {
|
|
545
545
|
const tableExists = await client.query(`
|
|
@@ -1698,7 +1698,7 @@ var PostgreSQLSkillStore = class {
|
|
|
1698
1698
|
`
|
|
1699
1699
|
INSERT INTO lattice_skills (id, tenant_id, name, description, license, compatibility, metadata, content, sub_skills, created_at, updated_at)
|
|
1700
1700
|
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)
|
|
1701
|
-
ON CONFLICT (id) DO UPDATE SET
|
|
1701
|
+
ON CONFLICT (tenant_id, id) DO UPDATE SET
|
|
1702
1702
|
tenant_id = EXCLUDED.tenant_id,
|
|
1703
1703
|
name = EXCLUDED.name,
|
|
1704
1704
|
description = EXCLUDED.description,
|
|
@@ -1895,7 +1895,7 @@ import { Pool as Pool5 } from "pg";
|
|
|
1895
1895
|
|
|
1896
1896
|
// src/migrations/database_config_migrations.ts
|
|
1897
1897
|
var createDatabaseConfigsTable = {
|
|
1898
|
-
version:
|
|
1898
|
+
version: 111,
|
|
1899
1899
|
name: "create_database_configs_table",
|
|
1900
1900
|
up: async (client) => {
|
|
1901
1901
|
await client.query(`
|
|
@@ -3356,7 +3356,7 @@ var addUserStatusColumn = {
|
|
|
3356
3356
|
`);
|
|
3357
3357
|
await client.query(`
|
|
3358
3358
|
CREATE INDEX IF NOT EXISTS idx_lattice_users_status
|
|
3359
|
-
ON lattice_users(
|
|
3359
|
+
ON lattice_users(status)
|
|
3360
3360
|
`);
|
|
3361
3361
|
await client.query(`
|
|
3362
3362
|
UPDATE lattice_users
|
|
@@ -4461,7 +4461,7 @@ var addPriorityAndCommandColumns = {
|
|
|
4461
4461
|
|
|
4462
4462
|
// src/migrations/add_custom_run_config_column.ts
|
|
4463
4463
|
var addCustomRunConfigColumn = {
|
|
4464
|
-
version:
|
|
4464
|
+
version: 114,
|
|
4465
4465
|
name: "add_custom_run_config_column",
|
|
4466
4466
|
up: async (client) => {
|
|
4467
4467
|
await client.query(`
|
|
@@ -6183,7 +6183,7 @@ var PostgreSQLEvalStore = class {
|
|
|
6183
6183
|
/** Delete a run and its results */
|
|
6184
6184
|
async deleteRun(tenantId, id) {
|
|
6185
6185
|
await this.ensureInitialized();
|
|
6186
|
-
await this.pool.query(`DELETE FROM lattice_eval_run_results WHERE run_id = $1 AND tenant_id = $2`, [id, tenantId]);
|
|
6186
|
+
await this.pool.query(`DELETE FROM lattice_eval_run_results WHERE run_id = $1 AND run_id IN (SELECT id FROM lattice_eval_runs WHERE tenant_id = $2)`, [id, tenantId]);
|
|
6187
6187
|
const { rowCount } = await this.pool.query(
|
|
6188
6188
|
`DELETE FROM lattice_eval_runs WHERE id = $1 AND tenant_id = $2`,
|
|
6189
6189
|
[id, tenantId]
|