diff --git a/server/postgres/migrations/allSchema.sql b/server/postgres/migrations/allSchema.sql new file mode 100644 index 0000000000..03ef74e920 --- /dev/null +++ b/server/postgres/migrations/allSchema.sql @@ -0,0 +1,37 @@ +DO $$ +DECLARE + tbl_name text; + hash_col_not_exists boolean; + data_col_exists boolean; +BEGIN + FOR tbl_name IN + SELECT table_name + FROM information_schema.tables + WHERE table_schema = 'public' + AND table_type = 'BASE TABLE' + LOOP + EXECUTE format(' + SELECT EXISTS ( + SELECT 1 + FROM information_schema.columns + WHERE table_name = %L + AND column_name = ''data'' + AND data_type = ''jsonb'' + );', tbl_name) INTO data_col_exists; + + EXECUTE format(' + SELECT NOT EXISTS ( + SELECT 1 + FROM information_schema.columns + WHERE table_name = %L + AND column_name = ''"%%hash%%"'' + );', tbl_name) INTO hash_col_not_exists; + + IF data_col_exists AND hash_col_not_exists THEN + EXECUTE format(' + ALTER TABLE %I ADD COLUMN "%%hash%%" text;', tbl_name); + EXECUTE format(' + UPDATE %I SET "%%hash%%" = data->>''%%data%%'';', tbl_name); + END IF; + END LOOP; +END $$; \ No newline at end of file diff --git a/server/postgres/migrations/dncSchema.sql b/server/postgres/migrations/dncSchema.sql new file mode 100644 index 0000000000..0405e31699 --- /dev/null +++ b/server/postgres/migrations/dncSchema.sql @@ -0,0 +1,25 @@ +ALTER TABLE notification_dnc +ADD "objectId" text, +ADD "objectClass" text, +ADD "user" text; + +ALTER TABLE notification_dnc +DROP COLUMN "attachedTo"; + +UPDATE notification_dnc +SET "objectId" = (data->>'objectId'); + +UPDATE notification_dnc +SET "objectClass" = (data->>'objectClass'); + +UPDATE notification_dnc +SET "user" = (data->>'user'); + +ALTER TABLE notification_dnc +ALTER COLUMN "objectId" SET NOT NULL; + +ALTER TABLE notification_dnc +ALTER COLUMN "objectClass" SET NOT NULL; + +ALTER TABLE notification_dnc +ALTER COLUMN "user" SET NOT NULL; \ No newline at end of file diff --git a/server/postgres/migrations/docIndexStateSchema.sql b/server/postgres/migrations/docIndexStateSchema.sql new file mode 100644 index 0000000000..06ccb44898 --- /dev/null +++ b/server/postgres/migrations/docIndexStateSchema.sql @@ -0,0 +1,11 @@ +ALTER TABLE doc_index_state +ADD "needIndex" bool; + +ALTER TABLE doc_index_state +DROP COLUMN "attachedTo"; + +UPDATE doc_index_state +SET "needIndex" = (data->>'needIndex')::boolean; + +ALTER TABLE doc_index_state +ALTER COLUMN "needIndex" SET NOT NULL; \ No newline at end of file diff --git a/server/postgres/migrations/notificationSchema.sql b/server/postgres/migrations/notificationSchema.sql new file mode 100644 index 0000000000..8bd87d53a9 --- /dev/null +++ b/server/postgres/migrations/notificationSchema.sql @@ -0,0 +1,25 @@ +ALTER TABLE notification +ADD "isViewed" bool, +ADD archived bool, +ADD "user" text; + +ALTER TABLE notification +DROP COLUMN "attachedTo"; + +UPDATE notification +SET "isViewed" = (data->>'isViewed')::boolean; + +UPDATE notification +SET "archived" = (data->>'archived')::boolean; + +UPDATE notification +SET "user" = (data->>'user'); + +ALTER TABLE notification +ALTER COLUMN "isViewed" SET NOT NULL; + +ALTER TABLE notification +ALTER COLUMN archived SET NOT NULL; + +ALTER TABLE notification +ALTER COLUMN "user" SET NOT NULL; \ No newline at end of file diff --git a/server/postgres/migrations/txSchema.sql b/server/postgres/migrations/txSchema.sql new file mode 100644 index 0000000000..8c93d6f35d --- /dev/null +++ b/server/postgres/migrations/txSchema.sql @@ -0,0 +1,15 @@ +ALTER TABLE tx +ADD "objectSpace" text, +ADD "objectId" text; + +ALTER TABLE tx +DROP COLUMN "attachedTo"; + +UPDATE tx +SET "objectId" = (data->>'objectId'); + +UPDATE tx +SET "objectSpace" = (data->>'objectSpace'); + +ALTER TABLE tx +ALTER COLUMN "objectSpace" SET NOT NULL; \ No newline at end of file diff --git a/server/postgres/migrations/uncSchema.sql b/server/postgres/migrations/uncSchema.sql new file mode 100644 index 0000000000..125304c879 --- /dev/null +++ b/server/postgres/migrations/uncSchema.sql @@ -0,0 +1,11 @@ +ALTER TABLE notification_user +ADD "user" text; + +ALTER TABLE notification_user +DROP COLUMN "attachedTo"; + +UPDATE notification_user +SET "user" = (data->>'user'); + +ALTER TABLE notification_user +ALTER COLUMN "user" SET NOT NULL; \ No newline at end of file diff --git a/server/postgres/src/index.ts b/server/postgres/src/index.ts index 12dce9b0eb..faa3c82c2c 100644 --- a/server/postgres/src/index.ts +++ b/server/postgres/src/index.ts @@ -14,4 +14,5 @@ // export * from './storage' -export { getDBClient, convertDoc, createTable, retryTxn, translateDomain, getDocFieldsByDomains } from './utils' +export { getDBClient, convertDoc, createTable, retryTxn } from './utils' +export { getDocFieldsByDomains, translateDomain } from './schemas' diff --git a/server/postgres/src/schemas.ts b/server/postgres/src/schemas.ts index 9215cd65f6..1c866ec4c4 100644 --- a/server/postgres/src/schemas.ts +++ b/server/postgres/src/schemas.ts @@ -1,10 +1,10 @@ -import { DOMAIN_SPACE } from '@hcengineering/core' +import { DOMAIN_DOC_INDEX_STATE, DOMAIN_SPACE, DOMAIN_TX } from '@hcengineering/core' type DataType = 'bigint' | 'bool' | 'text' | 'text[]' type Schema = Record -export const defaultSchema: Schema = { +const baseSchema: Schema = { _id: ['text', true], _class: ['text', true], space: ['text', true], @@ -12,25 +12,68 @@ export const defaultSchema: Schema = { createdBy: ['text', false], modifiedOn: ['bigint', true], createdOn: ['bigint', false], + '%hash%': ['text', false] +} + +const defaultSchema: Schema = { + ...baseSchema, attachedTo: ['text', false] } -export const spaceSchema: Schema = { - _id: ['text', true], - _class: ['text', true], - space: ['text', true], - modifiedBy: ['text', true], - createdBy: ['text', false], - modifiedOn: ['bigint', true], - createdOn: ['bigint', false], +const spaceSchema: Schema = { + ...baseSchema, private: ['bool', true], members: ['text[]', true] } +const txSchema: Schema = { + ...baseSchema, + objectSpace: ['text', true], + objectId: ['text', false] +} + +const notificationSchema: Schema = { + ...baseSchema, + isViewed: ['bool', true], + archived: ['bool', true], + user: ['text', true] +} + +const dncSchema: Schema = { + ...baseSchema, + objectId: ['text', true], + objectClass: ['text', true], + user: ['text', true] +} + +const userNotificationSchema: Schema = { + ...baseSchema, + user: ['text', true] +} + +const docIndexStateSchema: Schema = { + ...baseSchema, + needIndex: ['bool', true] +} + +export function translateDomain (domain: string): string { + return domain.replaceAll('-', '_') +} + export const domainSchemas: Record = { - [DOMAIN_SPACE]: spaceSchema + [DOMAIN_SPACE]: spaceSchema, + [DOMAIN_TX]: txSchema, + [translateDomain(DOMAIN_DOC_INDEX_STATE)]: docIndexStateSchema, + notification: notificationSchema, + [translateDomain('notification-dnc')]: dncSchema, + [translateDomain('notification-user')]: userNotificationSchema } export function getSchema (domain: string): Schema { - return domainSchemas[domain] ?? defaultSchema + return domainSchemas[translateDomain(domain)] ?? defaultSchema +} + +export function getDocFieldsByDomains (domain: string): string[] { + const schema = domainSchemas[translateDomain(domain)] ?? defaultSchema + return Object.keys(schema) } diff --git a/server/postgres/src/storage.ts b/server/postgres/src/storage.ts index 89935257ed..9e72e4bb06 100644 --- a/server/postgres/src/storage.ts +++ b/server/postgres/src/storage.ts @@ -74,7 +74,6 @@ import { type DBDoc, escapeBackticks, getDBClient, - getDocFieldsByDomains, inferType, isDataField, isOwner, @@ -82,9 +81,9 @@ import { parseDoc, parseDocWithProjection, parseUpdate, - type PostgresClientReference, - translateDomain + type PostgresClientReference } from './utils' +import { getDocFieldsByDomains, translateDomain } from './schemas' abstract class PostgresAdapterBase implements DbAdapter { protected readonly _helper: DBCollectionHelper @@ -1550,7 +1549,7 @@ class PostgresTxAdapter extends PostgresAdapterBase implements TxAdapter { async getModel (ctx: MeasureContext): Promise { const res = await this - .client`SELECT * FROM ${this.client(translateDomain(DOMAIN_TX))} WHERE "workspaceId" = ${this.workspaceId.name} AND data->>'objectSpace' = ${core.space.Model} ORDER BY _id ASC, "modifiedOn" ASC` + .client`SELECT * FROM ${this.client(translateDomain(DOMAIN_TX))} WHERE "workspaceId" = ${this.workspaceId.name} AND "objectSpace" = ${core.space.Model} ORDER BY _id ASC, "modifiedOn" ASC` const model = res.map((p) => parseDoc(p as any)) // We need to put all core.account.System transactions first diff --git a/server/postgres/src/utils.ts b/server/postgres/src/utils.ts index fc0b04a9d6..fd031066f1 100644 --- a/server/postgres/src/utils.ts +++ b/server/postgres/src/utils.ts @@ -30,7 +30,7 @@ import core, { import { PlatformError, unknownStatus } from '@hcengineering/platform' import { type DomainHelperOperations } from '@hcengineering/server-core' import postgres from 'postgres' -import { defaultSchema, domainSchemas, getSchema } from './schemas' +import { getDocFieldsByDomains, getSchema, translateDomain } from './schemas' const connections = new Map() @@ -329,10 +329,6 @@ export class DBCollectionHelper implements DomainHelperOperations { } } -export function translateDomain (domain: string): string { - return domain.replaceAll('-', '_') -} - export function parseDocWithProjection (doc: DBDoc, projection: Projection | undefined): T { const { workspaceId, data, ...rest } = doc for (const key in rest) { @@ -397,11 +393,6 @@ export function isDataField (domain: string, field: string): boolean { return !getDocFieldsByDomains(domain).includes(field) } -export function getDocFieldsByDomains (domain: string): string[] { - const schema = domainSchemas[domain] ?? defaultSchema - return Object.keys(schema) -} - export interface JoinProps { table: string // table to join path: string // _id.roles, attachedTo.attachedTo, space... diff --git a/server/tool/src/index.ts b/server/tool/src/index.ts index 46c29b60ce..b2220d83e0 100644 --- a/server/tool/src/index.ts +++ b/server/tool/src/index.ts @@ -33,7 +33,6 @@ import core, { WorkspaceId, WorkspaceIdWithUrl, type Client, - type Doc, type Ref, type WithLookup } from '@hcengineering/core' @@ -112,15 +111,16 @@ export async function initModel ( try { logger.log('creating database...', workspaceId) - await adapter.upload(ctx, DOMAIN_TX, [ - { - _class: core.class.Tx, - _id: 'first-tx' as Ref, - modifiedBy: core.account.System, - modifiedOn: Date.now(), - space: core.space.DerivedTx - } - ]) + const firstTx: Tx = { + _class: core.class.Tx, + _id: 'first-tx' as Ref, + modifiedBy: core.account.System, + modifiedOn: Date.now(), + space: core.space.DerivedTx, + objectSpace: core.space.DerivedTx + } + + await adapter.upload(ctx, DOMAIN_TX, [firstTx]) await progress(30) diff --git a/tests/restore-workspace.sh b/tests/restore-workspace.sh index 05c494a8d8..59cbcd3d74 100755 --- a/tests/restore-workspace.sh +++ b/tests/restore-workspace.sh @@ -3,7 +3,7 @@ # Restore workspace contents in mongo/elastic ./tool.sh backup-restore ./sanity-ws sanity-ws -./tool.sh upgrade-workspace sanity-ws --indexes +./tool.sh upgrade-workspace sanity-ws --indexes --force # Re-assign user to workspace. ./tool.sh assign-workspace user1 sanity-ws diff --git a/tests/sanity-ws/000001/_migrations-1730472769365-0.snp.gz b/tests/sanity-ws/000001/_migrations-1730472769365-0.snp.gz new file mode 100644 index 0000000000..28f5aca43d Binary files /dev/null and b/tests/sanity-ws/000001/_migrations-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/_migrations-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/_migrations-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..ad44ebea4c Binary files /dev/null and b/tests/sanity-ws/000001/_migrations-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/activity-1729588583864-0.snp.gz b/tests/sanity-ws/000001/activity-1729588583864-0.snp.gz deleted file mode 100644 index b6f0ce426d..0000000000 Binary files a/tests/sanity-ws/000001/activity-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/activity-1730472769365-0.snp.gz b/tests/sanity-ws/000001/activity-1730472769365-0.snp.gz new file mode 100644 index 0000000000..d354c1c212 Binary files /dev/null and b/tests/sanity-ws/000001/activity-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/activity-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/activity-data-1729588583864-1.tar.gz deleted file mode 100644 index 1fd7b0103c..0000000000 Binary files a/tests/sanity-ws/000001/activity-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/activity-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/activity-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..7d7bf1a7c8 Binary files /dev/null and b/tests/sanity-ws/000001/activity-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/attachment-1729588583864-0.snp.gz b/tests/sanity-ws/000001/attachment-1730472769365-0.snp.gz similarity index 100% rename from tests/sanity-ws/000001/attachment-1729588583864-0.snp.gz rename to tests/sanity-ws/000001/attachment-1730472769365-0.snp.gz diff --git a/tests/sanity-ws/000001/attachment-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/attachment-data-1729588583864-1.tar.gz deleted file mode 100644 index e41b2d7085..0000000000 Binary files a/tests/sanity-ws/000001/attachment-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/attachment-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/attachment-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..76570a9f35 Binary files /dev/null and b/tests/sanity-ws/000001/attachment-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/blob-1729588583864-0.snp.gz b/tests/sanity-ws/000001/blob-1729588583864-0.snp.gz deleted file mode 100644 index d99682fe5c..0000000000 Binary files a/tests/sanity-ws/000001/blob-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/blob-1730472769365-0.snp.gz b/tests/sanity-ws/000001/blob-1730472769365-0.snp.gz new file mode 100644 index 0000000000..12e6feba46 Binary files /dev/null and b/tests/sanity-ws/000001/blob-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/blob-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/blob-data-1729588583864-1.tar.gz deleted file mode 100644 index 6aa1922190..0000000000 Binary files a/tests/sanity-ws/000001/blob-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/blob-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/blob-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..d88d61cd4b Binary files /dev/null and b/tests/sanity-ws/000001/blob-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/calendar-1730472769365-0.snp.gz b/tests/sanity-ws/000001/calendar-1730472769365-0.snp.gz new file mode 100644 index 0000000000..5895b7a13f Binary files /dev/null and b/tests/sanity-ws/000001/calendar-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/calendar-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/calendar-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..fa13e5860b Binary files /dev/null and b/tests/sanity-ws/000001/calendar-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/channel-1729588583864-0.snp.gz b/tests/sanity-ws/000001/channel-1730472769365-0.snp.gz similarity index 100% rename from tests/sanity-ws/000001/channel-1729588583864-0.snp.gz rename to tests/sanity-ws/000001/channel-1730472769365-0.snp.gz diff --git a/tests/sanity-ws/000001/channel-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/channel-data-1729588583864-1.tar.gz deleted file mode 100644 index 83bf9cd342..0000000000 Binary files a/tests/sanity-ws/000001/channel-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/channel-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/channel-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..35595d9ce5 Binary files /dev/null and b/tests/sanity-ws/000001/channel-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/chunter-1729588583864-0.snp.gz b/tests/sanity-ws/000001/chunter-1729588583864-0.snp.gz deleted file mode 100644 index 28f06f9e43..0000000000 Binary files a/tests/sanity-ws/000001/chunter-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/chunter-1730472769365-0.snp.gz b/tests/sanity-ws/000001/chunter-1730472769365-0.snp.gz new file mode 100644 index 0000000000..763c12b5cd Binary files /dev/null and b/tests/sanity-ws/000001/chunter-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/chunter-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/chunter-data-1729588583864-1.tar.gz deleted file mode 100644 index 3851f2b1b3..0000000000 Binary files a/tests/sanity-ws/000001/chunter-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/chunter-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/chunter-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..ba510a753e Binary files /dev/null and b/tests/sanity-ws/000001/chunter-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/contact-1729588583864-0.snp.gz b/tests/sanity-ws/000001/contact-1729588583864-0.snp.gz deleted file mode 100644 index 61d3188be9..0000000000 Binary files a/tests/sanity-ws/000001/contact-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/contact-1730472769365-0.snp.gz b/tests/sanity-ws/000001/contact-1730472769365-0.snp.gz new file mode 100644 index 0000000000..385e169f5e Binary files /dev/null and b/tests/sanity-ws/000001/contact-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/contact-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/contact-data-1729588583864-1.tar.gz deleted file mode 100644 index e43f838af6..0000000000 Binary files a/tests/sanity-ws/000001/contact-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/contact-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/contact-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..c489c75447 Binary files /dev/null and b/tests/sanity-ws/000001/contact-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/doc-index-state-1729588583864-0.snp.gz b/tests/sanity-ws/000001/doc-index-state-1729588583864-0.snp.gz deleted file mode 100644 index deded16d78..0000000000 Binary files a/tests/sanity-ws/000001/doc-index-state-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/doc-index-state-1730472769365-0.snp.gz b/tests/sanity-ws/000001/doc-index-state-1730472769365-0.snp.gz new file mode 100644 index 0000000000..c8942d64c2 Binary files /dev/null and b/tests/sanity-ws/000001/doc-index-state-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/doc-index-state-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/doc-index-state-data-1729588583864-1.tar.gz deleted file mode 100644 index cee19fa486..0000000000 Binary files a/tests/sanity-ws/000001/doc-index-state-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/doc-index-state-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/doc-index-state-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..032ce940b9 Binary files /dev/null and b/tests/sanity-ws/000001/doc-index-state-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/documents-1730472769365-0.snp.gz b/tests/sanity-ws/000001/documents-1730472769365-0.snp.gz new file mode 100644 index 0000000000..cbb0ea7b9e Binary files /dev/null and b/tests/sanity-ws/000001/documents-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/documents-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/documents-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..f99d967c01 Binary files /dev/null and b/tests/sanity-ws/000001/documents-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/hr-1730472769365-0.snp.gz b/tests/sanity-ws/000001/hr-1730472769365-0.snp.gz new file mode 100644 index 0000000000..f2ec9726df Binary files /dev/null and b/tests/sanity-ws/000001/hr-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/hr-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/hr-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..e4a3108d56 Binary files /dev/null and b/tests/sanity-ws/000001/hr-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/inventory-1729588583864-0.snp.gz b/tests/sanity-ws/000001/inventory-1729588583864-0.snp.gz deleted file mode 100644 index 98c2745906..0000000000 Binary files a/tests/sanity-ws/000001/inventory-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/inventory-1730472769365-0.snp.gz b/tests/sanity-ws/000001/inventory-1730472769365-0.snp.gz new file mode 100644 index 0000000000..915ae1a184 Binary files /dev/null and b/tests/sanity-ws/000001/inventory-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/inventory-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/inventory-data-1729588583864-1.tar.gz deleted file mode 100644 index f2585594b4..0000000000 Binary files a/tests/sanity-ws/000001/inventory-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/inventory-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/inventory-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..d7b573de58 Binary files /dev/null and b/tests/sanity-ws/000001/inventory-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/kanban-1729588583864-0.snp.gz b/tests/sanity-ws/000001/kanban-1729588583864-0.snp.gz deleted file mode 100644 index 7a80797f49..0000000000 Binary files a/tests/sanity-ws/000001/kanban-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/kanban-1730472769365-0.snp.gz b/tests/sanity-ws/000001/kanban-1730472769365-0.snp.gz new file mode 100644 index 0000000000..053935dcbb Binary files /dev/null and b/tests/sanity-ws/000001/kanban-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/kanban-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/kanban-data-1729588583864-1.tar.gz deleted file mode 100644 index 82dd03b8be..0000000000 Binary files a/tests/sanity-ws/000001/kanban-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/kanban-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/kanban-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..ad2aa67ba1 Binary files /dev/null and b/tests/sanity-ws/000001/kanban-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/love-1730472769365-0.snp.gz b/tests/sanity-ws/000001/love-1730472769365-0.snp.gz new file mode 100644 index 0000000000..6208b2980e Binary files /dev/null and b/tests/sanity-ws/000001/love-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/love-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/love-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..7e8d0bfeea Binary files /dev/null and b/tests/sanity-ws/000001/love-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/notification-1729588583864-0.snp.gz b/tests/sanity-ws/000001/notification-1729588583864-0.snp.gz deleted file mode 100644 index 5222cb208a..0000000000 Binary files a/tests/sanity-ws/000001/notification-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/notification-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/notification-data-1729588583864-1.tar.gz deleted file mode 100644 index c4083eca77..0000000000 Binary files a/tests/sanity-ws/000001/notification-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/notification-dnc-1730472769365-0.snp.gz b/tests/sanity-ws/000001/notification-dnc-1730472769365-0.snp.gz new file mode 100644 index 0000000000..d12213e601 Binary files /dev/null and b/tests/sanity-ws/000001/notification-dnc-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/notification-dnc-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/notification-dnc-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..8692b0f7c7 Binary files /dev/null and b/tests/sanity-ws/000001/notification-dnc-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/preference-1730472769365-0.snp.gz b/tests/sanity-ws/000001/preference-1730472769365-0.snp.gz new file mode 100644 index 0000000000..4d9ceffbd2 Binary files /dev/null and b/tests/sanity-ws/000001/preference-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/preference-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/preference-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..8c4269806c Binary files /dev/null and b/tests/sanity-ws/000001/preference-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/space-1729588583864-0.snp.gz b/tests/sanity-ws/000001/space-1729588583864-0.snp.gz deleted file mode 100644 index 5cf596d84a..0000000000 Binary files a/tests/sanity-ws/000001/space-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/space-1730472769365-0.snp.gz b/tests/sanity-ws/000001/space-1730472769365-0.snp.gz new file mode 100644 index 0000000000..58f1379998 Binary files /dev/null and b/tests/sanity-ws/000001/space-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/space-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/space-data-1729588583864-1.tar.gz deleted file mode 100644 index 790ee00274..0000000000 Binary files a/tests/sanity-ws/000001/space-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/space-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/space-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..5c943a5d1d Binary files /dev/null and b/tests/sanity-ws/000001/space-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/status-1729588583864-0.snp.gz b/tests/sanity-ws/000001/status-1729588583864-0.snp.gz deleted file mode 100644 index 07735bf4a4..0000000000 Binary files a/tests/sanity-ws/000001/status-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/status-1730472769365-0.snp.gz b/tests/sanity-ws/000001/status-1730472769365-0.snp.gz new file mode 100644 index 0000000000..c4ee48fa20 Binary files /dev/null and b/tests/sanity-ws/000001/status-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/status-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/status-data-1729588583864-1.tar.gz deleted file mode 100644 index 92b9c284a9..0000000000 Binary files a/tests/sanity-ws/000001/status-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/status-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/status-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..adbc17e05b Binary files /dev/null and b/tests/sanity-ws/000001/status-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/tags-1729588583864-0.snp.gz b/tests/sanity-ws/000001/tags-1729588583864-0.snp.gz deleted file mode 100644 index b39225ce11..0000000000 Binary files a/tests/sanity-ws/000001/tags-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/tags-1730472769365-0.snp.gz b/tests/sanity-ws/000001/tags-1730472769365-0.snp.gz new file mode 100644 index 0000000000..1470045162 Binary files /dev/null and b/tests/sanity-ws/000001/tags-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/tags-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/tags-data-1729588583864-1.tar.gz deleted file mode 100644 index 8cc79dc357..0000000000 Binary files a/tests/sanity-ws/000001/tags-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/tags-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/tags-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..20a9b26a06 Binary files /dev/null and b/tests/sanity-ws/000001/tags-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/task-1729588583864-0.snp.gz b/tests/sanity-ws/000001/task-1729588583864-0.snp.gz deleted file mode 100644 index a9c992c6ff..0000000000 Binary files a/tests/sanity-ws/000001/task-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/task-1730472769365-0.snp.gz b/tests/sanity-ws/000001/task-1730472769365-0.snp.gz new file mode 100644 index 0000000000..ef34eceebf Binary files /dev/null and b/tests/sanity-ws/000001/task-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/task-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/task-data-1729588583864-1.tar.gz deleted file mode 100644 index 94dc24ac89..0000000000 Binary files a/tests/sanity-ws/000001/task-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/task-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/task-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..f5490cb0d9 Binary files /dev/null and b/tests/sanity-ws/000001/task-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/time-1729588583864-0.snp.gz b/tests/sanity-ws/000001/time-1730472769365-0.snp.gz similarity index 100% rename from tests/sanity-ws/000001/time-1729588583864-0.snp.gz rename to tests/sanity-ws/000001/time-1730472769365-0.snp.gz diff --git a/tests/sanity-ws/000001/time-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/time-data-1729588583864-1.tar.gz deleted file mode 100644 index 8f3d3d43c3..0000000000 Binary files a/tests/sanity-ws/000001/time-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/time-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/time-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..8a7ec328bf Binary files /dev/null and b/tests/sanity-ws/000001/time-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/tracker-1729588583864-0.snp.gz b/tests/sanity-ws/000001/tracker-1730472769365-0.snp.gz similarity index 100% rename from tests/sanity-ws/000001/tracker-1729588583864-0.snp.gz rename to tests/sanity-ws/000001/tracker-1730472769365-0.snp.gz diff --git a/tests/sanity-ws/000001/tracker-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/tracker-data-1729588583864-1.tar.gz deleted file mode 100644 index 651243d8b6..0000000000 Binary files a/tests/sanity-ws/000001/tracker-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/tracker-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/tracker-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..542fc7b480 Binary files /dev/null and b/tests/sanity-ws/000001/tracker-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/training-1730472769365-0.snp.gz b/tests/sanity-ws/000001/training-1730472769365-0.snp.gz new file mode 100644 index 0000000000..cb79d599d5 Binary files /dev/null and b/tests/sanity-ws/000001/training-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/training-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/training-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..15df168a84 Binary files /dev/null and b/tests/sanity-ws/000001/training-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/000001/tx-1729588583864-0.snp.gz b/tests/sanity-ws/000001/tx-1729588583864-0.snp.gz deleted file mode 100644 index 4a2cee9ce5..0000000000 Binary files a/tests/sanity-ws/000001/tx-1729588583864-0.snp.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/tx-1730472769365-0.snp.gz b/tests/sanity-ws/000001/tx-1730472769365-0.snp.gz new file mode 100644 index 0000000000..5bb0bf49fe Binary files /dev/null and b/tests/sanity-ws/000001/tx-1730472769365-0.snp.gz differ diff --git a/tests/sanity-ws/000001/tx-data-1729588583864-1.tar.gz b/tests/sanity-ws/000001/tx-data-1729588583864-1.tar.gz deleted file mode 100644 index cd9155b45f..0000000000 Binary files a/tests/sanity-ws/000001/tx-data-1729588583864-1.tar.gz and /dev/null differ diff --git a/tests/sanity-ws/000001/tx-data-1730472769365-1.tar.gz b/tests/sanity-ws/000001/tx-data-1730472769365-1.tar.gz new file mode 100644 index 0000000000..93e5d049d3 Binary files /dev/null and b/tests/sanity-ws/000001/tx-data-1730472769365-1.tar.gz differ diff --git a/tests/sanity-ws/backup.json.gz b/tests/sanity-ws/backup.json.gz index e985e060e5..d08d28e3d1 100644 Binary files a/tests/sanity-ws/backup.json.gz and b/tests/sanity-ws/backup.json.gz differ diff --git a/tests/sanity-ws/backup.size.gz b/tests/sanity-ws/backup.size.gz index 781156afb9..06eb14de8a 100644 Binary files a/tests/sanity-ws/backup.size.gz and b/tests/sanity-ws/backup.size.gz differ diff --git a/tests/update-snapshot.sh b/tests/update-snapshot.sh index 46d710498d..226ee7d046 100755 --- a/tests/update-snapshot.sh +++ b/tests/update-snapshot.sh @@ -1,9 +1,10 @@ export MINIO_ACCESS_KEY=minioadmin export MINIO_SECRET_KEY=minioadmin -export MINIO_ENDPOINT=localhost:9000 -export MONGO_URL=mongodb://localhost:27017 -export ELASTIC_URL=http://localhost:9200 +export MINIO_ENDPOINT=localhost:9002 +export ACCOUNTS_URL=http://localhost:3003 +export MONGO_URL=mongodb://localhost:27018 +export ELASTIC_URL=http://localhost:9201 export SERVER_SECRET=secret location="${1:-./sanity-ws}"