Skip to content

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

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

export const alterDevicesPlatformColumn: Migration = {
  up: async (db) => {
    await db.schema
      .alterTable('devices')
      .alterColumn('platform', (col) => col.setDataType('varchar(255)'))
      .execute();
  },
  down: async (db) => {
    await db.schema
      .alterTable('devices')
      .alterColumn('platform', (col) => col.setDataType('varchar(30)'))
      .execute();
  },
};