bindbox-game/migrations/20260223_add_channel_fields_to_livestream_activities.sql
2026-02-27 00:08:02 +08:00

15 lines
475 B
SQL

-- +goose Up
ALTER TABLE `livestream_activities`
ADD COLUMN `channel_id` BIGINT NULL AFTER `streamer_contact`,
ADD COLUMN `channel_code` VARCHAR(64) NULL AFTER `channel_id`;
CREATE INDEX `idx_livestream_activities_channel_id`
ON `livestream_activities` (`channel_id`);
-- +goose Down
ALTER TABLE `livestream_activities`
DROP COLUMN `channel_code`,
DROP COLUMN `channel_id`;
DROP INDEX `idx_livestream_activities_channel_id` ON `livestream_activities`;