import type { Migration } from '@/shared/db';

export const devicePermissionsMigrations: readonly Migration[] = [
  {
    id: '2026-05-18_device_permissions_initial',
    sql: `
      CREATE TABLE IF NOT EXISTS macsync.device_permissions (
        device_id   UUID PRIMARY KEY REFERENCES macsync.devices(id) ON DELETE CASCADE,
        permissions JSONB NOT NULL,
        updated_at  TIMESTAMPTZ NOT NULL DEFAULT now()
      );
    `,
  },
];
