💾 Archived View for iich.space › src › db › migrations › 1631597658.ts captured on 2022-03-01 at 16:03:37.

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

import { Migration } from '../migrate';

export const migration: Migration = {
  down: (db) => {
    db.exec(`
ALTER TABLE boards DROP COLUMN description;
ALTER TABLE boards DROP COLUMN deleted;
ALTER TABLE posts DROP COLUMN deleted;
`);
  },
  up: (db) => {
    db.exec(`
ALTER TABLE boards ADD description VARCHAR(255);
ALTER TABLE boards ADD deleted INTEGER DEFAULT 0;
ALTER TABLE posts ADD deleted INTEGER DEFAULT 0;
`);
  },
  version: 1631597658,
};