💾 Archived View for iich.space › src › db › migrations › 1632450406.ts captured on 2021-12-03 at 14:04:38.

View Raw

More Information

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

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

export const migration: Migration = {
  down: (db) => {
    db.exec(`
ALTER TABLE boards DROP COLUMN type;
ALTER TABLE posts DROP COLUMN image;
`);
  },
  up: (db) => {
    db.exec(`
ALTER TABLE boards ADD type INTEGER DEFAULT 0;
ALTER TABLE posts ADD image VARCHAR(32);
`);
  },
  version: 1632450406,
};