1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-19 00:15:43 +01:00
unleash.unleash/src/migrations/20241016123833-ai-chats-rename-chat-col-to-messages.js
Nuno Góis 3f8d4c3538
chore: update schemas related to Unleash AI chat (#8463)
https://linear.app/unleash/issue/2-2779/store-conversations-in-the-database

Updates schemas related to Unleash AI chat and renames the `chat` column
to `messages` to ensure everything aligns nicely.
2024-10-16 14:44:37 +01:00

18 lines
307 B
JavaScript

exports.up = function (db, cb) {
db.runSql(
`
ALTER TABLE ai_chats RENAME COLUMN chat TO messages;
`,
cb,
);
};
exports.down = function (db, cb) {
db.runSql(
`
ALTER TABLE ai_chats RENAME COLUMN messages TO chat;
`,
cb,
);
};