вложения, канальчики, бим-бим + бам-бам

This commit is contained in:
2026-04-25 00:51:12 +06:00
parent 0b75148a3f
commit ad477ee813
61 changed files with 14636 additions and 375 deletions

33
server/prisma/seed.ts Normal file
View File

@@ -0,0 +1,33 @@
import { PrismaBetterSqlite3 } from '@prisma/adapter-better-sqlite3'
import { PrismaClient } from './generated-client/client.ts'
import 'dotenv/config'
const prisma = new PrismaClient({
adapter: new PrismaBetterSqlite3({
url: process.env.DATABASE_URL!,
}),
})
async function main() {
const _now = new Date()
await prisma.channel.upsert({
where: { id: 'default' },
create: {
id: 'default',
name: 'Default channel',
persistent: true,
},
update: {
persistent: true,
},
})
}
main()
.then(async () => {
await prisma.$disconnect()
})
.catch(async (e) => {
console.error(e)
await prisma.$disconnect()
process.exit(1)
})