[
  {
    "type": "alter_table",
    "description": "Add recurrenceWeeks to scheduleAvailability (1 = weekly, 2 = every other week, etc.)",
    "database": "{{store}}",
    "check_query": "SHOW COLUMNS FROM `scheduleAvailability` LIKE 'recurrenceWeeks'",
    "sql": "ALTER TABLE `scheduleAvailability` ADD COLUMN `recurrenceWeeks` tinyint(1) unsigned NOT NULL DEFAULT 1 COMMENT 'Cadence in weeks: 1=every week, 2=every other week, etc.' AFTER `isPreferred`"
  },
  {
    "type": "alter_table",
    "description": "Add weekIndex to scheduleAvailability (which week of the cadence cycle this row is active on)",
    "database": "{{store}}",
    "check_query": "SHOW COLUMNS FROM `scheduleAvailability` LIKE 'weekIndex'",
    "sql": "ALTER TABLE `scheduleAvailability` ADD COLUMN `weekIndex` tinyint(1) unsigned NOT NULL DEFAULT 0 COMMENT 'Absolute cycle parity this row is active on (0..recurrenceWeeks-1), equal to weekNumber mod recurrenceWeeks. Ignored when recurrenceWeeks=1.' AFTER `recurrenceWeeks`"
  }
]
