Messenger/packages/backend/migrations/1720000000008_channels.cjs
Заид Омар Медхат | Zaid Omar Medhat f5b620111b redesign
2026-07-11 04:49:07 +05:00

15 lines
543 B
JavaScript

// Channels — broadcast conversations (type='channel') where only the owner and
// admins post. `type` is a plain text column, so the new value needs no DDL;
// channels just add an optional description shown on the info page.
/** @param {import('node-pg-migrate').MigrationBuilder} pgm */
exports.up = (pgm) => {
pgm.addColumns('conversations', {
description: { type: 'text' },
});
};
/** @param {import('node-pg-migrate').MigrationBuilder} pgm */
exports.down = (pgm) => {
pgm.dropColumns('conversations', ['description']);
};