--liquibase formatted sql

--changeset fpsms:client_presence_client_ip
--preconditions onFail:MARK_RAN
--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'client_presence' AND column_name = 'client_ip'
--comment: Last seen client IP from HTTP request (not MAC; browsers cannot expose MAC)
ALTER TABLE `client_presence`
  ADD COLUMN `client_ip` varchar(45) DEFAULT NULL;

--changeset fpsms:client_presence_event_client_ip
--preconditions onFail:MARK_RAN
--precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name = 'client_presence_event' AND column_name = 'client_ip'
ALTER TABLE `client_presence_event`
  ADD COLUMN `client_ip` varchar(45) DEFAULT NULL;
