Skip to content

Commit

Permalink
Upgrade dwn-sdk-js to v0.3.0 (#31)
Browse files Browse the repository at this point in the history
- upgrade `dwn-sdk-js` to v0.3.0
- modify column `permissionsGrantId` to `permissionGrantId`
- modify `valueNumber` type to be `decimal/numerical` which supports
both integers and numbers for tags
- release v `0.4.0` of `dwn-sql-store` as these are breaking changes
  • Loading branch information
LiranCohen authored Apr 25, 2024
1 parent 61be6ea commit 039c489
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 19 deletions.
5 changes: 4 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ coverage:
informational: true
patch:
default:
informational: true # Don't gate PRs based on Codecov passing thresholds
informational: true # Don't gate PRs based on Codecov passing thresholds

ignore:
- "src/types"
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tbd54566975/dwn-sql-store",
"version": "0.3.0",
"version": "0.4.0",
"description": "SQL backed implementations of DWN MessageStore, DataStore, and EventLog",
"type": "module",
"license": "Apache-2.0",
Expand All @@ -21,7 +21,7 @@
"react-native": "./dist/esm/src/main.js",
"dependencies": {
"@ipld/dag-cbor": "^9.0.5",
"@tbd54566975/dwn-sdk-js": "0.2.23",
"@tbd54566975/dwn-sdk-js": "0.3.0",
"kysely": "0.26.3",
"multiformats": "12.0.1",
"readable-stream": "4.4.2"
Expand Down
4 changes: 2 additions & 2 deletions src/event-log-sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ export class EventLogSql implements EventLog {
.addColumn('recipient', 'text')
.addColumn('contextId', 'text')
.addColumn('parentId', 'text')
.addColumn('permissionsGrantId', 'text');
.addColumn('permissionGrantId', 'text');
// "indexes" end

let createRecordsTagsTable = this.#db.schema
.createTable('eventLogRecordsTags')
.ifNotExists()
.addColumn('tag', 'text', (col) => col.notNull())
.addColumn('valueString', 'text')
.addColumn('valueNumber', 'integer');
.addColumn('valueNumber', 'decimal');
// Add columns that have dialect-specific constraints
createTable = this.#dialect.addAutoIncrementingColumn(createTable, 'watermark', (col) => col.primaryKey());
createRecordsTagsTable = this.#dialect.addAutoIncrementingColumn(createRecordsTagsTable, 'id', (col) => col.primaryKey());
Expand Down
4 changes: 2 additions & 2 deletions src/message-store-sql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ export class MessageStoreSql implements MessageStore {
.addColumn('recipient', 'text')
.addColumn('contextId', 'text')
.addColumn('parentId', 'text')
.addColumn('permissionsGrantId', 'text');
.addColumn('permissionGrantId', 'text');
// "indexes" end

let createRecordsTagsTable = this.#db.schema
.createTable('messageStoreRecordsTags')
.ifNotExists()
.addColumn('tag', 'text', (col) => col.notNull())
.addColumn('valueString', 'text')
.addColumn('valueNumber', 'integer');
.addColumn('valueNumber', 'decimal');

// Add columns that have dialect-specific constraints
createTable = this.#dialect.addAutoIncrementingColumn(createTable, 'id', (col) => col.primaryKey());
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type EventLogTable = {
recipient: string | null;
contextId: string | null;
parentId: string | null;
permissionsGrantId: string | null;
permissionGrantId: string | null;
// "indexes" end
}

Expand Down Expand Up @@ -73,7 +73,7 @@ type MessageStoreTable = {
recipient: string | null;
contextId: string | null;
parentId: string | null;
permissionsGrantId: string | null;
permissionGrantId: string | null;
// "indexes" end
}

Expand Down

0 comments on commit 039c489

Please sign in to comment.