Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 added migrate v13.go to drop constraint `UNIQUE(name, time_star… #552

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pasmophobia
Copy link

@pasmophobia pasmophobia self-assigned this Jul 4, 2024
@pasmophobia
Copy link
Author

Revertは必要ないので実装していません.というのは,このmigrationはrevertされたコミットの内容が反映されてしまった本番環境を元の状態に戻すためのものだからです.

@pasmophobia pasmophobia requested a review from iChemy July 5, 2024 05:48
@iChemy
Copy link
Contributor

iChemy commented Jul 5, 2024

手元で試してたのですが

ALTER TABLE events DROP CONSTRAINT UNIQUE(name, time_start, time_end)
Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNIQUE(name, time_start, time_end)' at line 1

となっておそらく

ALTER TABLE events DROP CONSTRAINT idx_name_time_start_time_end

が正しいクエリな気がします.

そちらでも試してみてください.

@ras0q
Copy link
Member

ras0q commented Jul 5, 2024

idx_...があるかの確認も必要そう

@pasmophobia
Copy link
Author

修正しました.レビューお願いします

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

名前と時間が完全一致するイベントが (元のイベントを削除しても) 作成できない
4 participants