Make email_addr unique
This commit is contained in:
parent
e18fab859b
commit
f755addae6
|
@ -53,7 +53,7 @@ sub startup($self) {
|
|||
# Finish configuring some things
|
||||
$self->secrets($self->config->{'secrets'}) || die $@;
|
||||
|
||||
$self->pg->migrations->from_dir('migrations')->migrate(9);
|
||||
$self->pg->migrations->from_dir('migrations')->migrate(10);
|
||||
|
||||
if (my $threads_per_page = $self->config->{'threads_per_page'}) {
|
||||
$self->thread->per_page($threads_per_page)
|
||||
|
|
3
migrations/10/down.sql
Normal file
3
migrations/10/down.sql
Normal file
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE moderators
|
||||
DROP CONSTRAINT moderators_email_addr_key;
|
||||
|
2
migrations/10/up.sql
Normal file
2
migrations/10/up.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE moderators
|
||||
ADD UNIQUE (email_addr);
|
Loading…
Reference in New Issue
Block a user