mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 00:02:00 +02:00
Dedupe follows
This commit is contained in:
parent
1efe0d486b
commit
b5920d8ba8
2 changed files with 22 additions and 0 deletions
9
migrations/073_add_follow_uniqueness.rb
Normal file
9
migrations/073_add_follow_uniqueness.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
Sequel.migration do
|
||||
up {
|
||||
DB['alter table follows add constraint one_follow_per_site unique (site_id, actioning_site_id)'].first
|
||||
}
|
||||
|
||||
down {
|
||||
DB['alter table follows drop constraint one_follow_per_site'].first
|
||||
}
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue