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

資料と人物の関係のバリデーションとインデックスを更新 #1742

Merged
merged 2 commits into from
Nov 12, 2022

Conversation

nabeta
Copy link
Member

@nabeta nabeta commented Nov 12, 2022

  • たとえば、createsテーブルは資料と著者の関係を扱うテーブルで、work_idカラムとagent_idカラムが存在する
  • ひとつの資料に同じ著者が複数紐づくことはないため、work_idカラムとagent_idカラムの組み合わせは一意になる。この組み合わせに対して、ユニークインデックスを追加する
  • これにあわせて、一意性チェックのバリデーションの順序を、agent_id -> work_idからwork_id -> agent_idに変更する
  • realizes, produces, ownsテーブルも同様

@nabeta nabeta merged commit a888ee6 into main Nov 12, 2022
@nabeta nabeta deleted the creates-agent-scope branch November 12, 2022 12:34
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.

1 participant