]> Untitled Git - lemmy.git/blob - migrations/2021-11-23-132840_email_verification/up.sql
Moving settings to Database. (#2492)
[lemmy.git] / migrations / 2021-11-23-132840_email_verification / up.sql
1 -- use defaults from db for local user init
2 alter table local_user alter column theme set default 'browser';
3 alter table local_user alter column default_listing_type set default 2;
4
5 -- add tables and columns for optional email verification
6 alter table site add column require_email_verification boolean not null default false;
7 alter table local_user add column email_verified boolean not null default false;
8
9 create table email_verification (
10     id serial primary key,
11     local_user_id int references local_user(id) on update cascade on delete cascade not null,
12     email text not null,
13     verification_token text not null
14 );