From 80cd99d36b355639b130e2dc222f4a9c45ebd261 Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Wed, 14 Feb 2024 02:01:43 +0000 Subject: [PATCH 1/4] chore: update @mapeo/schema to get new features This updates `@mapeo/schema` to `3.0.0-next.14`, which pulls in two significant features: 1. New `Translation` schema 2. New `deviceType` property on `DeviceInfo` Neither of these are useful right now but will unblock upcoming changes. --- drizzle/project/0001_curved_korvac.sql | 19 + drizzle/project/meta/0001_snapshot.json | 1005 +++++++++++++++++++++++ drizzle/project/meta/_journal.json | 7 + package-lock.json | 8 +- package.json | 2 +- src/datastore/index.js | 9 +- src/schema/project.js | 4 + 7 files changed, 1048 insertions(+), 6 deletions(-) create mode 100644 drizzle/project/0001_curved_korvac.sql create mode 100644 drizzle/project/meta/0001_snapshot.json diff --git a/drizzle/project/0001_curved_korvac.sql b/drizzle/project/0001_curved_korvac.sql new file mode 100644 index 00000000..2cff628a --- /dev/null +++ b/drizzle/project/0001_curved_korvac.sql @@ -0,0 +1,19 @@ +CREATE TABLE `translation` ( + `docId` text PRIMARY KEY NOT NULL, + `versionId` text NOT NULL, + `schemaName` text NOT NULL, + `createdAt` text NOT NULL, + `createdBy` text NOT NULL, + `updatedAt` text NOT NULL, + `links` text NOT NULL, + `deleted` integer NOT NULL, + `schemaNameRef` text NOT NULL, + `docIdRef` text NOT NULL, + `fieldRef` text NOT NULL, + `languageCode` text NOT NULL, + `regionCode` text NOT NULL, + `message` text NOT NULL, + `forks` text NOT NULL +); +--> statement-breakpoint +ALTER TABLE deviceInfo ADD `deviceType` text; \ No newline at end of file diff --git a/drizzle/project/meta/0001_snapshot.json b/drizzle/project/meta/0001_snapshot.json new file mode 100644 index 00000000..92db7aa1 --- /dev/null +++ b/drizzle/project/meta/0001_snapshot.json @@ -0,0 +1,1005 @@ +{ + "version": "5", + "dialect": "sqlite", + "id": "81a3d2bc-dbbf-49f4-a609-c1c9b8eba353", + "prevId": "1df09db6-316f-496d-a39a-89a99cca1ad9", + "tables": { + "coreOwnership_backlink": { + "name": "coreOwnership_backlink", + "columns": { + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "coreOwnership": { + "name": "coreOwnership", + "columns": { + "docId": { + "name": "docId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "schemaName": { + "name": "schemaName", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdAt": { + "name": "createdAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdBy": { + "name": "createdBy", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updatedAt": { + "name": "updatedAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "links": { + "name": "links", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "deleted": { + "name": "deleted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "authCoreId": { + "name": "authCoreId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "configCoreId": { + "name": "configCoreId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "dataCoreId": { + "name": "dataCoreId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "blobCoreId": { + "name": "blobCoreId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "blobIndexCoreId": { + "name": "blobIndexCoreId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "forks": { + "name": "forks", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "cores": { + "name": "cores", + "columns": { + "publicKey": { + "name": "publicKey", + "type": "blob", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "namespace": { + "name": "namespace", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "deviceInfo_backlink": { + "name": "deviceInfo_backlink", + "columns": { + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "deviceInfo": { + "name": "deviceInfo", + "columns": { + "docId": { + "name": "docId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "schemaName": { + "name": "schemaName", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdAt": { + "name": "createdAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdBy": { + "name": "createdBy", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updatedAt": { + "name": "updatedAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "links": { + "name": "links", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "deleted": { + "name": "deleted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "deviceType": { + "name": "deviceType", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "forks": { + "name": "forks", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "field_backlink": { + "name": "field_backlink", + "columns": { + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "field": { + "name": "field", + "columns": { + "docId": { + "name": "docId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "schemaName": { + "name": "schemaName", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdAt": { + "name": "createdAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdBy": { + "name": "createdBy", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updatedAt": { + "name": "updatedAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "links": { + "name": "links", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "deleted": { + "name": "deleted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tagKey": { + "name": "tagKey", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "appearance": { + "name": "appearance", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "snakeCase": { + "name": "snakeCase", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "options": { + "name": "options", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "universal": { + "name": "universal", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "placeholder": { + "name": "placeholder", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "helperText": { + "name": "helperText", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "forks": { + "name": "forks", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "icon_backlink": { + "name": "icon_backlink", + "columns": { + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "icon": { + "name": "icon", + "columns": { + "docId": { + "name": "docId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "schemaName": { + "name": "schemaName", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdAt": { + "name": "createdAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdBy": { + "name": "createdBy", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updatedAt": { + "name": "updatedAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "links": { + "name": "links", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "deleted": { + "name": "deleted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "variants": { + "name": "variants", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "forks": { + "name": "forks", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "observation_backlink": { + "name": "observation_backlink", + "columns": { + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "observation": { + "name": "observation", + "columns": { + "docId": { + "name": "docId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "schemaName": { + "name": "schemaName", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdAt": { + "name": "createdAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdBy": { + "name": "createdBy", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updatedAt": { + "name": "updatedAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "links": { + "name": "links", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "deleted": { + "name": "deleted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "lat": { + "name": "lat", + "type": "real", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "lon": { + "name": "lon", + "type": "real", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "refs": { + "name": "refs", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "attachments": { + "name": "attachments", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "metadata": { + "name": "metadata", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "forks": { + "name": "forks", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "preset_backlink": { + "name": "preset_backlink", + "columns": { + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "preset": { + "name": "preset", + "columns": { + "docId": { + "name": "docId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "schemaName": { + "name": "schemaName", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdAt": { + "name": "createdAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdBy": { + "name": "createdBy", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updatedAt": { + "name": "updatedAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "links": { + "name": "links", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "deleted": { + "name": "deleted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "geometry": { + "name": "geometry", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "addTags": { + "name": "addTags", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "removeTags": { + "name": "removeTags", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "fieldIds": { + "name": "fieldIds", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "iconId": { + "name": "iconId", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "terms": { + "name": "terms", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "forks": { + "name": "forks", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "role_backlink": { + "name": "role_backlink", + "columns": { + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "role": { + "name": "role", + "columns": { + "docId": { + "name": "docId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "schemaName": { + "name": "schemaName", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdAt": { + "name": "createdAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdBy": { + "name": "createdBy", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updatedAt": { + "name": "updatedAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "links": { + "name": "links", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "deleted": { + "name": "deleted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "roleId": { + "name": "roleId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "fromIndex": { + "name": "fromIndex", + "type": "real", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "forks": { + "name": "forks", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "translation": { + "name": "translation", + "columns": { + "docId": { + "name": "docId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "schemaName": { + "name": "schemaName", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdAt": { + "name": "createdAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdBy": { + "name": "createdBy", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updatedAt": { + "name": "updatedAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "links": { + "name": "links", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "deleted": { + "name": "deleted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "schemaNameRef": { + "name": "schemaNameRef", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "docIdRef": { + "name": "docIdRef", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "fieldRef": { + "name": "fieldRef", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "languageCode": { + "name": "languageCode", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "regionCode": { + "name": "regionCode", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "forks": { + "name": "forks", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + } +} \ No newline at end of file diff --git a/drizzle/project/meta/_journal.json b/drizzle/project/meta/_journal.json index bc2e9859..d1def558 100644 --- a/drizzle/project/meta/_journal.json +++ b/drizzle/project/meta/_journal.json @@ -8,6 +8,13 @@ "when": 1704981085509, "tag": "0000_steep_gunslinger", "breakpoints": true + }, + { + "idx": 1, + "version": "5", + "when": 1707875832858, + "tag": "0001_curved_korvac", + "breakpoints": true } ] } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 2c4bfbb0..1b9cf448 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@fastify/type-provider-typebox": "^3.3.0", "@hyperswarm/secret-stream": "^6.1.2", "@mapeo/crypto": "1.0.0-alpha.10", - "@mapeo/schema": "3.0.0-next.13", + "@mapeo/schema": "^3.0.0-next.14", "@mapeo/sqlite-indexer": "1.0.0-alpha.8", "@sinclair/typebox": "^0.29.6", "@types/yauzl-promise": "^2.1.5", @@ -702,9 +702,9 @@ } }, "node_modules/@mapeo/schema": { - "version": "3.0.0-next.13", - "resolved": "https://registry.npmjs.org/@mapeo/schema/-/schema-3.0.0-next.13.tgz", - "integrity": "sha512-g5+Lx0uGzq5i2nlrDvuPExkzrQpzx3dhl1G1gfXm72Hw8he2ecGOm5Gu9vW9PsfKtN45AKRy+jd7kfl9+jLhpw==", + "version": "3.0.0-next.14", + "resolved": "https://registry.npmjs.org/@mapeo/schema/-/schema-3.0.0-next.14.tgz", + "integrity": "sha512-i0AUHbwMxUyggk6SDURxLPXOVCWlLAszSKUYm2fviQXYrGNcUALniw8JBn3x5jzfCFW1xrTUNhIcnt4IuF95mA==", "dependencies": { "@json-schema-tools/dereferencer": "^1.6.1", "ajv": "^8.12.0", diff --git a/package.json b/package.json index 7a026915..5e74f0ce 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "@fastify/type-provider-typebox": "^3.3.0", "@hyperswarm/secret-stream": "^6.1.2", "@mapeo/crypto": "1.0.0-alpha.10", - "@mapeo/schema": "3.0.0-next.13", + "@mapeo/schema": "^3.0.0-next.14", "@mapeo/sqlite-indexer": "1.0.0-alpha.8", "@sinclair/typebox": "^0.29.6", "@types/yauzl-promise": "^2.1.5", diff --git a/src/datastore/index.js b/src/datastore/index.js index 5d61e005..b8f7e8d3 100644 --- a/src/datastore/index.js +++ b/src/datastore/index.js @@ -29,7 +29,14 @@ import { createMap } from '../utils.js' const NAMESPACE_SCHEMAS = /** @type {const} */ ({ data: ['observation'], - config: ['preset', 'field', 'projectSettings', 'deviceInfo', 'icon'], + config: [ + 'translation', + 'preset', + 'field', + 'projectSettings', + 'deviceInfo', + 'icon', + ], auth: ['coreOwnership', 'role'], }) diff --git a/src/schema/project.js b/src/schema/project.js index 933b6da4..59723df4 100644 --- a/src/schema/project.js +++ b/src/schema/project.js @@ -6,6 +6,10 @@ import { NAMESPACES } from '../constants.js' import { jsonSchemaToDrizzleColumns as toColumns } from './schema-to-drizzle.js' import { backlinkTable } from './utils.js' +export const translationTable = sqliteTable( + 'translation', + toColumns(schemas.translation) +) export const observationTable = sqliteTable( 'observation', toColumns(schemas.observation) From 7655bb16fd86d5e673ac0c2b054ec8dbb74f921c Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Wed, 14 Feb 2024 16:02:53 +0000 Subject: [PATCH 2/4] Add backlink table --- ...korvac.sql => 0001_natural_norrin_radd.sql} | 4 ++++ drizzle/project/meta/0001_snapshot.json | 18 +++++++++++++++++- drizzle/project/meta/_journal.json | 4 ++-- src/schema/project.js | 1 + 4 files changed, 24 insertions(+), 3 deletions(-) rename drizzle/project/{0001_curved_korvac.sql => 0001_natural_norrin_radd.sql} (83%) diff --git a/drizzle/project/0001_curved_korvac.sql b/drizzle/project/0001_natural_norrin_radd.sql similarity index 83% rename from drizzle/project/0001_curved_korvac.sql rename to drizzle/project/0001_natural_norrin_radd.sql index 2cff628a..c5513242 100644 --- a/drizzle/project/0001_curved_korvac.sql +++ b/drizzle/project/0001_natural_norrin_radd.sql @@ -1,3 +1,7 @@ +CREATE TABLE `translation_backlink` ( + `versionId` text PRIMARY KEY NOT NULL +); +--> statement-breakpoint CREATE TABLE `translation` ( `docId` text PRIMARY KEY NOT NULL, `versionId` text NOT NULL, diff --git a/drizzle/project/meta/0001_snapshot.json b/drizzle/project/meta/0001_snapshot.json index 92db7aa1..39008bd1 100644 --- a/drizzle/project/meta/0001_snapshot.json +++ b/drizzle/project/meta/0001_snapshot.json @@ -1,7 +1,7 @@ { "version": "5", "dialect": "sqlite", - "id": "81a3d2bc-dbbf-49f4-a609-c1c9b8eba353", + "id": "a4a90688-b027-44b4-a0e6-d69a20335d40", "prevId": "1df09db6-316f-496d-a39a-89a99cca1ad9", "tables": { "coreOwnership_backlink": { @@ -881,6 +881,22 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, + "translation_backlink": { + "name": "translation_backlink", + "columns": { + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, "translation": { "name": "translation", "columns": { diff --git a/drizzle/project/meta/_journal.json b/drizzle/project/meta/_journal.json index d1def558..c12a4532 100644 --- a/drizzle/project/meta/_journal.json +++ b/drizzle/project/meta/_journal.json @@ -12,8 +12,8 @@ { "idx": 1, "version": "5", - "when": 1707875832858, - "tag": "0001_curved_korvac", + "when": 1707926553838, + "tag": "0001_natural_norrin_radd", "breakpoints": true } ] diff --git a/src/schema/project.js b/src/schema/project.js index 59723df4..070b2764 100644 --- a/src/schema/project.js +++ b/src/schema/project.js @@ -27,6 +27,7 @@ export const deviceInfoTable = sqliteTable( ) export const iconTable = sqliteTable('icon', toColumns(schemas.icon)) +export const translationBacklinkTable = backlinkTable(translationTable) export const observationBacklinkTable = backlinkTable(observationTable) export const presetBacklinkTable = backlinkTable(presetTable) export const fieldBacklinkTable = backlinkTable(fieldTable) From fdbdcd34982dc990e9901b9b2f6eaede17b72c85 Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Thu, 15 Feb 2024 02:52:37 +0000 Subject: [PATCH 3/4] Clobber migration --- ...ger.sql => 0000_supreme_forgotten_one.sql} | 23 + drizzle/project/0001_natural_norrin_radd.sql | 23 - drizzle/project/meta/0000_snapshot.json | 139 ++- drizzle/project/meta/0001_snapshot.json | 1021 ----------------- drizzle/project/meta/_journal.json | 11 +- 5 files changed, 163 insertions(+), 1054 deletions(-) rename drizzle/project/{0000_steep_gunslinger.sql => 0000_supreme_forgotten_one.sql} (86%) delete mode 100644 drizzle/project/0001_natural_norrin_radd.sql delete mode 100644 drizzle/project/meta/0001_snapshot.json diff --git a/drizzle/project/0000_steep_gunslinger.sql b/drizzle/project/0000_supreme_forgotten_one.sql similarity index 86% rename from drizzle/project/0000_steep_gunslinger.sql rename to drizzle/project/0000_supreme_forgotten_one.sql index 52da088c..9010ac79 100644 --- a/drizzle/project/0000_steep_gunslinger.sql +++ b/drizzle/project/0000_supreme_forgotten_one.sql @@ -38,6 +38,7 @@ CREATE TABLE `deviceInfo` ( `links` text NOT NULL, `deleted` integer NOT NULL, `name` text NOT NULL, + `deviceType` text, `forks` text NOT NULL ); --> statement-breakpoint @@ -147,3 +148,25 @@ CREATE TABLE `role` ( `fromIndex` real NOT NULL, `forks` text NOT NULL ); +--> statement-breakpoint +CREATE TABLE `translation_backlink` ( + `versionId` text PRIMARY KEY NOT NULL +); +--> statement-breakpoint +CREATE TABLE `translation` ( + `docId` text PRIMARY KEY NOT NULL, + `versionId` text NOT NULL, + `schemaName` text NOT NULL, + `createdAt` text NOT NULL, + `createdBy` text NOT NULL, + `updatedAt` text NOT NULL, + `links` text NOT NULL, + `deleted` integer NOT NULL, + `schemaNameRef` text NOT NULL, + `docIdRef` text NOT NULL, + `fieldRef` text NOT NULL, + `languageCode` text NOT NULL, + `regionCode` text NOT NULL, + `message` text NOT NULL, + `forks` text NOT NULL +); diff --git a/drizzle/project/0001_natural_norrin_radd.sql b/drizzle/project/0001_natural_norrin_radd.sql deleted file mode 100644 index c5513242..00000000 --- a/drizzle/project/0001_natural_norrin_radd.sql +++ /dev/null @@ -1,23 +0,0 @@ -CREATE TABLE `translation_backlink` ( - `versionId` text PRIMARY KEY NOT NULL -); ---> statement-breakpoint -CREATE TABLE `translation` ( - `docId` text PRIMARY KEY NOT NULL, - `versionId` text NOT NULL, - `schemaName` text NOT NULL, - `createdAt` text NOT NULL, - `createdBy` text NOT NULL, - `updatedAt` text NOT NULL, - `links` text NOT NULL, - `deleted` integer NOT NULL, - `schemaNameRef` text NOT NULL, - `docIdRef` text NOT NULL, - `fieldRef` text NOT NULL, - `languageCode` text NOT NULL, - `regionCode` text NOT NULL, - `message` text NOT NULL, - `forks` text NOT NULL -); ---> statement-breakpoint -ALTER TABLE deviceInfo ADD `deviceType` text; \ No newline at end of file diff --git a/drizzle/project/meta/0000_snapshot.json b/drizzle/project/meta/0000_snapshot.json index c25fd064..7fa05f6f 100644 --- a/drizzle/project/meta/0000_snapshot.json +++ b/drizzle/project/meta/0000_snapshot.json @@ -1,7 +1,7 @@ { "version": "5", "dialect": "sqlite", - "id": "1df09db6-316f-496d-a39a-89a99cca1ad9", + "id": "f68815a6-4e7a-4ca7-9882-6f31bb34b716", "prevId": "00000000-0000-0000-0000-000000000000", "tables": { "coreOwnership_backlink": { @@ -232,6 +232,13 @@ "notNull": true, "autoincrement": false }, + "deviceType": { + "name": "deviceType", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, "forks": { "name": "forks", "type": "text", @@ -873,6 +880,136 @@ "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {} + }, + "translation_backlink": { + "name": "translation_backlink", + "columns": { + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "translation": { + "name": "translation", + "columns": { + "docId": { + "name": "docId", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "versionId": { + "name": "versionId", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "schemaName": { + "name": "schemaName", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdAt": { + "name": "createdAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "createdBy": { + "name": "createdBy", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updatedAt": { + "name": "updatedAt", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "links": { + "name": "links", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "deleted": { + "name": "deleted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "schemaNameRef": { + "name": "schemaNameRef", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "docIdRef": { + "name": "docIdRef", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "fieldRef": { + "name": "fieldRef", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "languageCode": { + "name": "languageCode", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "regionCode": { + "name": "regionCode", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "forks": { + "name": "forks", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} } }, "enums": {}, diff --git a/drizzle/project/meta/0001_snapshot.json b/drizzle/project/meta/0001_snapshot.json deleted file mode 100644 index 39008bd1..00000000 --- a/drizzle/project/meta/0001_snapshot.json +++ /dev/null @@ -1,1021 +0,0 @@ -{ - "version": "5", - "dialect": "sqlite", - "id": "a4a90688-b027-44b4-a0e6-d69a20335d40", - "prevId": "1df09db6-316f-496d-a39a-89a99cca1ad9", - "tables": { - "coreOwnership_backlink": { - "name": "coreOwnership_backlink", - "columns": { - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "coreOwnership": { - "name": "coreOwnership", - "columns": { - "docId": { - "name": "docId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "schemaName": { - "name": "schemaName", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updatedAt": { - "name": "updatedAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "links": { - "name": "links", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deleted": { - "name": "deleted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "authCoreId": { - "name": "authCoreId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "configCoreId": { - "name": "configCoreId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "dataCoreId": { - "name": "dataCoreId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "blobCoreId": { - "name": "blobCoreId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "blobIndexCoreId": { - "name": "blobIndexCoreId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "forks": { - "name": "forks", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "cores": { - "name": "cores", - "columns": { - "publicKey": { - "name": "publicKey", - "type": "blob", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "namespace": { - "name": "namespace", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "deviceInfo_backlink": { - "name": "deviceInfo_backlink", - "columns": { - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "deviceInfo": { - "name": "deviceInfo", - "columns": { - "docId": { - "name": "docId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "schemaName": { - "name": "schemaName", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updatedAt": { - "name": "updatedAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "links": { - "name": "links", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deleted": { - "name": "deleted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deviceType": { - "name": "deviceType", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "forks": { - "name": "forks", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "field_backlink": { - "name": "field_backlink", - "columns": { - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "field": { - "name": "field", - "columns": { - "docId": { - "name": "docId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "schemaName": { - "name": "schemaName", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updatedAt": { - "name": "updatedAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "links": { - "name": "links", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deleted": { - "name": "deleted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tagKey": { - "name": "tagKey", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "label": { - "name": "label", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "appearance": { - "name": "appearance", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "snakeCase": { - "name": "snakeCase", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "options": { - "name": "options", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "universal": { - "name": "universal", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "placeholder": { - "name": "placeholder", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "helperText": { - "name": "helperText", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "forks": { - "name": "forks", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "icon_backlink": { - "name": "icon_backlink", - "columns": { - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "icon": { - "name": "icon", - "columns": { - "docId": { - "name": "docId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "schemaName": { - "name": "schemaName", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updatedAt": { - "name": "updatedAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "links": { - "name": "links", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deleted": { - "name": "deleted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "variants": { - "name": "variants", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "forks": { - "name": "forks", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "observation_backlink": { - "name": "observation_backlink", - "columns": { - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "observation": { - "name": "observation", - "columns": { - "docId": { - "name": "docId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "schemaName": { - "name": "schemaName", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updatedAt": { - "name": "updatedAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "links": { - "name": "links", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deleted": { - "name": "deleted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "lat": { - "name": "lat", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "lon": { - "name": "lon", - "type": "real", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "refs": { - "name": "refs", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "attachments": { - "name": "attachments", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tags": { - "name": "tags", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "metadata": { - "name": "metadata", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "forks": { - "name": "forks", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "preset_backlink": { - "name": "preset_backlink", - "columns": { - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "preset": { - "name": "preset", - "columns": { - "docId": { - "name": "docId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "schemaName": { - "name": "schemaName", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updatedAt": { - "name": "updatedAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "links": { - "name": "links", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deleted": { - "name": "deleted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "geometry": { - "name": "geometry", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "tags": { - "name": "tags", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "addTags": { - "name": "addTags", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "removeTags": { - "name": "removeTags", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "fieldIds": { - "name": "fieldIds", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "iconId": { - "name": "iconId", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "terms": { - "name": "terms", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "forks": { - "name": "forks", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "role_backlink": { - "name": "role_backlink", - "columns": { - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "role": { - "name": "role", - "columns": { - "docId": { - "name": "docId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "schemaName": { - "name": "schemaName", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updatedAt": { - "name": "updatedAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "links": { - "name": "links", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deleted": { - "name": "deleted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "roleId": { - "name": "roleId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "fromIndex": { - "name": "fromIndex", - "type": "real", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "forks": { - "name": "forks", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "translation_backlink": { - "name": "translation_backlink", - "columns": { - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "translation": { - "name": "translation", - "columns": { - "docId": { - "name": "docId", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "versionId": { - "name": "versionId", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "schemaName": { - "name": "schemaName", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdAt": { - "name": "createdAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "createdBy": { - "name": "createdBy", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "updatedAt": { - "name": "updatedAt", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "links": { - "name": "links", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "deleted": { - "name": "deleted", - "type": "integer", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "schemaNameRef": { - "name": "schemaNameRef", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "docIdRef": { - "name": "docIdRef", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "fieldRef": { - "name": "fieldRef", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "languageCode": { - "name": "languageCode", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "regionCode": { - "name": "regionCode", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "message": { - "name": "message", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - }, - "forks": { - "name": "forks", - "type": "text", - "primaryKey": false, - "notNull": true, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle/project/meta/_journal.json b/drizzle/project/meta/_journal.json index c12a4532..37f6585d 100644 --- a/drizzle/project/meta/_journal.json +++ b/drizzle/project/meta/_journal.json @@ -5,15 +5,8 @@ { "idx": 0, "version": "5", - "when": 1704981085509, - "tag": "0000_steep_gunslinger", - "breakpoints": true - }, - { - "idx": 1, - "version": "5", - "when": 1707926553838, - "tag": "0001_natural_norrin_radd", + "when": 1707965473123, + "tag": "0000_supreme_forgotten_one", "breakpoints": true } ] From 3b6069776123445b959de85c610c473785af016f Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Thu, 15 Feb 2024 20:09:58 +0000 Subject: [PATCH 4/4] Pin dependency to exact version --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1b9cf448..9b4e4fb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@fastify/type-provider-typebox": "^3.3.0", "@hyperswarm/secret-stream": "^6.1.2", "@mapeo/crypto": "1.0.0-alpha.10", - "@mapeo/schema": "^3.0.0-next.14", + "@mapeo/schema": "3.0.0-next.14", "@mapeo/sqlite-indexer": "1.0.0-alpha.8", "@sinclair/typebox": "^0.29.6", "@types/yauzl-promise": "^2.1.5", diff --git a/package.json b/package.json index 5e74f0ce..e0287b7c 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,7 @@ "@fastify/type-provider-typebox": "^3.3.0", "@hyperswarm/secret-stream": "^6.1.2", "@mapeo/crypto": "1.0.0-alpha.10", - "@mapeo/schema": "^3.0.0-next.14", + "@mapeo/schema": "3.0.0-next.14", "@mapeo/sqlite-indexer": "1.0.0-alpha.8", "@sinclair/typebox": "^0.29.6", "@types/yauzl-promise": "^2.1.5",