-- ============================================================
-- 0002_tenant_subdomain_provisioning.sql
-- Version: v1.0.0000
-- Tracks whether a tenant's {subdomain}.theclientspeaks.com has
-- actually been created in cPanel (not just reserved in our DB).
-- Run this in phpMyAdmin against the DEV database
-- (theclientspeaks_dev-app), confirm, then run against prod later.
-- CHANGELOG:
-- v1.0.0000 — Initial build
-- ============================================================

ALTER TABLE `tenants`
  ADD COLUMN `subdomain_provisioned` tinyint(1) NOT NULL DEFAULT 0 AFTER `api_key_created_at`,
  ADD COLUMN `subdomain_provisioned_at` datetime DEFAULT NULL AFTER `subdomain_provisioned`,
  ADD COLUMN `subdomain_provision_error` varchar(500) DEFAULT NULL AFTER `subdomain_provisioned_at`;
