Add boolean for admin

This commit is contained in:
swagg boi 2022-12-17 21:46:29 -05:00
parent 28c3e2df17
commit 4527219d91
3 changed files with 5 additions and 1 deletions

View file

@ -61,7 +61,7 @@ sub startup($self) {
# Finish configuring some things # Finish configuring some things
$self->secrets($self->config->{'secrets'}) || die $@; $self->secrets($self->config->{'secrets'}) || die $@;
$self->pg->migrations->from_dir('migrations')->migrate(10); $self->pg->migrations->from_dir('migrations')->migrate(11);
if (my $threads_per_page = $self->config->{'threads_per_page'}) { if (my $threads_per_page = $self->config->{'threads_per_page'}) {
$self->thread->per_page($threads_per_page) $self->thread->per_page($threads_per_page)

2
migrations/11/down.sql Normal file
View file

@ -0,0 +1,2 @@
ALTER TABLE moderators
DROP COLUMN admin_status;

2
migrations/11/up.sql Normal file
View file

@ -0,0 +1,2 @@
ALTER TABLE moderators
ADD admin_status BOOLEAN NOT NULL DEFAULT FALSE;