Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

394 B
Raw Blame
import { Migration } from 'kysely';

export const addWorkspaceIndexToUploads: Migration = {
  up: async (db) => {
    await db.schema
      .createIndex('uploads_workspace_id_idx')
      .on('uploads')
      .columns(['workspace_id'])
      .execute();
  },
  down: async (db) => {
    await db.schema
      .dropIndex('uploads_workspace_id_idx')
      .on('uploads')
      .execute();
  },
};