mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Force unique constraint on username
This commit is contained in:
parent
67ddf7d419
commit
e92fba18be
1 changed files with 8 additions and 0 deletions
8
migrations/093_unique_username_constraint.rb
Normal file
8
migrations/093_unique_username_constraint.rb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
Sequel.migration do
|
||||||
|
up {
|
||||||
|
DB['ALTER TABLE sites ADD CONSTRAINT uniqueusername UNIQUE (username)'].first
|
||||||
|
}
|
||||||
|
|
||||||
|
down {
|
||||||
|
}
|
||||||
|
end
|
Loading…
Add table
Reference in a new issue