// Adds soft-delete support for personal_notes via deleted_at.

exports.up = (pgm) => {
  pgm.addColumn('personal_notes', {
    deleted_at: { type: 'timestamptz', notNull: false, default: null },
  });
  pgm.createIndex('personal_notes', ['user_id', 'deleted_at']);
};

exports.down = (pgm) => {
  pgm.dropIndex('personal_notes', ['user_id', 'deleted_at']);
  pgm.dropColumn('personal_notes', 'deleted_at');
};
