Skip to content

Commit 1b28ad0

Browse files
committed
Merge branch 'develop'
2 parents 10db5c7 + ec30cf6 commit 1b28ad0

4 files changed

Lines changed: 77 additions & 1 deletion

File tree

app/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export default function Home() {
147147
Get started
148148
</Button>
149149
<Text marginTop={8} fontStyle="italic" textStyle="sm">
150-
Contact us if you have questions or need a code:{" "}
150+
Email us if you have questions:{" "}
151151
<ClientOnly>
152152
<Link color={iconColor} href="mailto:contact@bitp.art">
153153
contact [at] bitp.art
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { PrismaClient } from '@prisma/client'
2+
3+
const prisma = new PrismaClient()
4+
5+
async function main() {
6+
await prisma.$transaction(async (tx) => {
7+
const newState = await tx.state.create({
8+
data: {
9+
currentInstance: "default",
10+
}
11+
})
12+
13+
const bots = await tx.bot.findMany()
14+
for (const bot of bots) {
15+
await tx.bot.update({
16+
where: { id: bot.id },
17+
data: {
18+
instance: "default",
19+
},
20+
})
21+
}
22+
})
23+
}
24+
25+
main()
26+
.catch(async (e) => {
27+
console.error(e)
28+
process.exit(1)
29+
})
30+
.finally(async () => await prisma.$disconnect())
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { PrismaClient } from '@prisma/client'
2+
3+
const prisma = new PrismaClient()
4+
5+
async function main() {
6+
await prisma.$transaction(async (tx) => {
7+
const thisState = await tx.state.findUnique({
8+
where: {
9+
currentInstance: "default",
10+
},
11+
data: {
12+
lastInstance: "default",
13+
}
14+
})
15+
})
16+
}
17+
18+
main()
19+
.catch(async (e) => {
20+
console.error(e)
21+
process.exit(1)
22+
})
23+
.finally(async () => await prisma.$disconnect())
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { PrismaClient } from '@prisma/client'
2+
3+
const prisma = new PrismaClient()
4+
5+
async function main() {
6+
await prisma.$transaction(async (tx) => {
7+
const thisState = await tx.state.findUnique({
8+
where: {
9+
currentInstance: "default",
10+
},
11+
data: {
12+
name: "default"
13+
}
14+
})
15+
})
16+
}
17+
18+
main()
19+
.catch(async (e) => {
20+
console.error(e)
21+
process.exit(1)
22+
})
23+
.finally(async () => await prisma.$disconnect())

0 commit comments

Comments
 (0)