import { safeApplyColumnChanges, type Migration } from '../migrate';

export const up: Migration = async ({ context }) => {
  // Add extends column to product_vendors table
  await safeApplyColumnChanges(context, {
    product_vendors: [
      {
        name: 'extends',
        field: {
          type: 'JSON',
          allowNull: true,
        },
      },
    ],
  });
};

export const down: Migration = async ({ context }) => {
  await context.removeColumn('product_vendors', 'extends');
};
