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

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

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