mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Merge remote-tracking branch 'origin/main' into use-npool-nostrify
This commit is contained in:
commit
8768bb1bad
3 changed files with 44 additions and 5 deletions
|
|
@ -27,7 +27,7 @@
|
||||||
"@hono/hono": "jsr:@hono/hono@^4.4.6",
|
"@hono/hono": "jsr:@hono/hono@^4.4.6",
|
||||||
"@isaacs/ttlcache": "npm:@isaacs/ttlcache@^1.4.1",
|
"@isaacs/ttlcache": "npm:@isaacs/ttlcache@^1.4.1",
|
||||||
"@noble/secp256k1": "npm:@noble/secp256k1@^2.0.0",
|
"@noble/secp256k1": "npm:@noble/secp256k1@^2.0.0",
|
||||||
"@nostrify/nostrify": "jsr:@nostrify/nostrify@^0.26.0",
|
"@nostrify/nostrify": "jsr:@nostrify/nostrify@^0.26.3",
|
||||||
"@scure/base": "npm:@scure/base@^1.1.6",
|
"@scure/base": "npm:@scure/base@^1.1.6",
|
||||||
"@sentry/deno": "https://deno.land/x/sentry@7.112.2/index.mjs",
|
"@sentry/deno": "https://deno.land/x/sentry@7.112.2/index.mjs",
|
||||||
"@soapbox/kysely-deno-sqlite": "jsr:@soapbox/kysely-deno-sqlite@^2.1.0",
|
"@soapbox/kysely-deno-sqlite": "jsr:@soapbox/kysely-deno-sqlite@^2.1.0",
|
||||||
|
|
|
||||||
8
deno.lock
generated
8
deno.lock
generated
|
|
@ -12,7 +12,7 @@
|
||||||
"jsr:@nostrify/nostrify@^0.22.1": "jsr:@nostrify/nostrify@0.22.5",
|
"jsr:@nostrify/nostrify@^0.22.1": "jsr:@nostrify/nostrify@0.22.5",
|
||||||
"jsr:@nostrify/nostrify@^0.22.4": "jsr:@nostrify/nostrify@0.22.4",
|
"jsr:@nostrify/nostrify@^0.22.4": "jsr:@nostrify/nostrify@0.22.4",
|
||||||
"jsr:@nostrify/nostrify@^0.22.5": "jsr:@nostrify/nostrify@0.22.5",
|
"jsr:@nostrify/nostrify@^0.22.5": "jsr:@nostrify/nostrify@0.22.5",
|
||||||
"jsr:@nostrify/nostrify@^0.26.0": "jsr:@nostrify/nostrify@0.26.0",
|
"jsr:@nostrify/nostrify@^0.26.3": "jsr:@nostrify/nostrify@0.26.3",
|
||||||
"jsr:@soapbox/kysely-deno-sqlite@^2.1.0": "jsr:@soapbox/kysely-deno-sqlite@2.2.0",
|
"jsr:@soapbox/kysely-deno-sqlite@^2.1.0": "jsr:@soapbox/kysely-deno-sqlite@2.2.0",
|
||||||
"jsr:@soapbox/stickynotes@^0.4.0": "jsr:@soapbox/stickynotes@0.4.0",
|
"jsr:@soapbox/stickynotes@^0.4.0": "jsr:@soapbox/stickynotes@0.4.0",
|
||||||
"jsr:@std/assert@^0.217.0": "jsr:@std/assert@0.217.0",
|
"jsr:@std/assert@^0.217.0": "jsr:@std/assert@0.217.0",
|
||||||
|
|
@ -142,8 +142,8 @@
|
||||||
"npm:zod@^3.23.8"
|
"npm:zod@^3.23.8"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"@nostrify/nostrify@0.26.0": {
|
"@nostrify/nostrify@0.26.3": {
|
||||||
"integrity": "8a4a49326f2d2bdf27e9ac6dc8c052bb37b31ae892350daa1df470070fddacd1",
|
"integrity": "3e13e30f4fa3f76dcbcf9178630a9b2871186eb1d226d66234c0cdfd4841f548",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"jsr:@std/crypto@^0.224.0",
|
"jsr:@std/crypto@^0.224.0",
|
||||||
"jsr:@std/encoding@^0.224.1",
|
"jsr:@std/encoding@^0.224.1",
|
||||||
|
|
@ -1748,7 +1748,7 @@
|
||||||
"jsr:@bradenmacdonald/s3-lite-client@^0.7.4",
|
"jsr:@bradenmacdonald/s3-lite-client@^0.7.4",
|
||||||
"jsr:@db/sqlite@^0.11.1",
|
"jsr:@db/sqlite@^0.11.1",
|
||||||
"jsr:@hono/hono@^4.4.6",
|
"jsr:@hono/hono@^4.4.6",
|
||||||
"jsr:@nostrify/nostrify@^0.26.0",
|
"jsr:@nostrify/nostrify@^0.26.3",
|
||||||
"jsr:@soapbox/kysely-deno-sqlite@^2.1.0",
|
"jsr:@soapbox/kysely-deno-sqlite@^2.1.0",
|
||||||
"jsr:@soapbox/stickynotes@^0.4.0",
|
"jsr:@soapbox/stickynotes@^0.4.0",
|
||||||
"jsr:@std/assert@^0.225.1",
|
"jsr:@std/assert@^0.225.1",
|
||||||
|
|
|
||||||
39
src/db/migrations/028_stable_sort.ts
Normal file
39
src/db/migrations/028_stable_sort.ts
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
import { Kysely } from 'kysely';
|
||||||
|
|
||||||
|
export async function up(db: Kysely<any>): Promise<void> {
|
||||||
|
await db.schema
|
||||||
|
.createIndex('nostr_events_created_at_kind')
|
||||||
|
.on('nostr_events')
|
||||||
|
.ifNotExists()
|
||||||
|
.columns(['created_at desc', 'id asc', 'kind'])
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
await db.schema
|
||||||
|
.createIndex('nostr_events_kind_pubkey_created_at')
|
||||||
|
.on('nostr_events')
|
||||||
|
.ifNotExists()
|
||||||
|
.columns(['kind', 'pubkey', 'created_at desc', 'id asc'])
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
await db.schema.dropIndex('idx_events_created_at_kind').execute();
|
||||||
|
await db.schema.dropIndex('idx_events_kind_pubkey_created_at').execute();
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down(db: Kysely<any>): Promise<void> {
|
||||||
|
await db.schema.dropIndex('nostr_events_created_at_kind').execute();
|
||||||
|
await db.schema.dropIndex('nostr_events_kind_pubkey_created_at').execute();
|
||||||
|
|
||||||
|
await db.schema
|
||||||
|
.createIndex('idx_events_created_at_kind')
|
||||||
|
.on('nostr_events')
|
||||||
|
.ifNotExists()
|
||||||
|
.columns(['created_at desc', 'kind'])
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
await db.schema
|
||||||
|
.createIndex('idx_events_kind_pubkey_created_at')
|
||||||
|
.on('nostr_events')
|
||||||
|
.ifNotExists()
|
||||||
|
.columns(['kind', 'pubkey', 'created_at desc'])
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue