feat: company code and status, company on events and emails, admin login names
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
1 parent
4243a2d6cd
commit
840b5a3bae
6 files changed
+124
-1
No files matched your search
@@ -0,0 +1,17 @@
|
||||
-- Co-Lite change add-company-scoping: company on events and emails; one shared interest list.
|
||||
-- Run once, after 01. DDL: run with a user that may alter tables.
|
||||
USE `service-counter`;
|
||||
|
||||
ALTER TABLE `event` ADD COLUMN `company_id` bigint NULL, ADD KEY `idx_event_company` (`company_id`);
|
||||
UPDATE `event` SET `company_id` = 1 WHERE `company_id` IS NULL;
|
||||
|
||||
-- Interests are shared by every company: unique by name (case-insensitive collation); company_id kept, unused.
|
||||
ALTER TABLE `interest`
|
||||
DROP INDEX `uk_interest_company_name`,
|
||||
MODIFY COLUMN `company_id` bigint NULL,
|
||||
ADD UNIQUE KEY `uk_interest_name` (`name`);
|
||||
|
||||
USE `service-email`;
|
||||
|
||||
ALTER TABLE `email` ADD COLUMN `company_id` bigint NULL, ADD KEY `idx_email_company` (`company_id`);
|
||||
UPDATE `email` SET `company_id` = 1 WHERE `company_id` IS NULL;
|
||||
Reference in new issue
Block a user