Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: colors of the prompts for the threat level retro match now the prompts' names #9956

Merged
merged 3 commits into from
Jul 17, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import {r} from 'rethinkdb-ts'
import connectRethinkDB from '../../database/connectRethinkDB'

export async function up() {
await connectRethinkDB()

await r
.table('ReflectPrompt')
.filter({id: 'threatLevelPremortemTemplateSeverePrompt'})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 use get instead of filter, otherwise it won't use the index

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done and tested locally again both migrating up and down! Thanks for the correction!

.update({groupColor: '#FD6157'})
.run()
await r
.table('ReflectPrompt')
.filter({id: 'threatLevelPremortemTemplateElevatedPrompt'})
.update({groupColor: '#FFCC63'})
.run()
await r
.table('ReflectPrompt')
.filter({id: 'threatLevelPremortemTemplateLowPrompt'})
.update({groupColor: '#66BC8C'})
.run()
}

export async function down() {
await connectRethinkDB()

await r
.table('ReflectPrompt')
.filter({id: 'threatLevelPremortemTemplateSeverePrompt'})
.update({groupColor: '#66BC8C'})
.run()
await r
.table('ReflectPrompt')
.filter({id: 'threatLevelPremortemTemplateElevatedPrompt'})
.update({groupColor: '#FD6157'})
.run()
await r
.table('ReflectPrompt')
.filter({id: 'threatLevelPremortemTemplateLowPrompt'})
.update({groupColor: '#FFCC63'})
.run()
}
Loading