chore: simplify referral codes (#28491)

This commit is contained in:
Victor Navarro
2026-05-20 19:15:20 +02:00
committed by GitHub
parent ef82426e28
commit b67b03e0ae
6 changed files with 3206 additions and 36 deletions
@@ -0,0 +1,13 @@
CREATE TABLE `referral_code` (
`workspace_id` varchar(30) PRIMARY KEY,
`code` varchar(10) NOT NULL,
`time_created` timestamp(3) NOT NULL DEFAULT (now()),
`time_updated` timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
`time_deleted` timestamp(3),
CONSTRAINT `code` UNIQUE INDEX(`code`)
);
--> statement-breakpoint
DROP INDEX `referral_invitee_account_id` ON `referral`;--> statement-breakpoint
DROP INDEX `referral_code` ON `workspace`;--> statement-breakpoint
CREATE UNIQUE INDEX `invitee_account_id` ON `referral` (`invitee_account_id`);--> statement-breakpoint
ALTER TABLE `workspace` DROP COLUMN `referral_code`;
File diff suppressed because it is too large Load Diff