14 lines
494 B
SQL
14 lines
494 B
SQL
-- +goose Up
|
|
|
|
ALTER TABLE chat_qrcode_pool
|
|
ADD COLUMN distribution_site_id BIGINT UNSIGNED NULL AFTER group_name,
|
|
ADD KEY idx_chat_qrcode_distribution_site (distribution_site_id, status),
|
|
ADD CONSTRAINT fk_chat_qrcode_distribution_site FOREIGN KEY (distribution_site_id) REFERENCES distribution_sites (id);
|
|
|
|
-- +goose Down
|
|
|
|
ALTER TABLE chat_qrcode_pool
|
|
DROP FOREIGN KEY fk_chat_qrcode_distribution_site,
|
|
DROP KEY idx_chat_qrcode_distribution_site,
|
|
DROP COLUMN distribution_site_id;
|