diff options
author | Alex Vitkov <alexvitkov98@gmail.com> | 2021-02-15 14:47:37 +0200 |
---|---|---|
committer | Alex Vitkov <alexvitkov98@gmail.com> | 2021-02-15 14:47:37 +0200 |
commit | 7fe813121b2e6d95ad6e86eeaf12ed58dc2ff729 (patch) | |
tree | 4088b7f5ca5b1368794a81032ea52ae221c2287f /INIT_DATABASE.sql | |
parent | 8b1406ede7389c9e50fa0c095be7a8524d265c8c (diff) | |
parent | 7532e744e0be43657cafffce171f875ffe94fc3f (diff) | |
download | fileup-7fe813121b2e6d95ad6e86eeaf12ed58dc2ff729.tar.gz |
Merge branch 'master' of https://github.com/alexvitkov/india
Diffstat (limited to 'INIT_DATABASE.sql')
-rw-r--r-- | INIT_DATABASE.sql | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/INIT_DATABASE.sql b/INIT_DATABASE.sql index 2d772e4..5499de1 100644 --- a/INIT_DATABASE.sql +++ b/INIT_DATABASE.sql @@ -9,6 +9,7 @@ drop table if exists trash; drop table if exists super_trash; drop table if exists shared_nodes; drop table if exists nodes; +drop table if exists email_verification_codes; @@ -18,6 +19,7 @@ drop trigger if exists del_node; drop trigger if exists supper_del_node; +drop view if exists usernames; @@ -76,6 +78,14 @@ create table super_trash ( node_id int not null ); +create table email_verification_codes ( + verification_id int not null auto_increment, + verification_code varchar(100) not null, + username varchar(50) not null unique, + password varchar(255) not null, + email varchar(50), + primary key (verification_id) + ); create trigger delete_on_zero_links after delete @@ -113,4 +123,8 @@ create trigger delete_links delete from node_links where directory_id=old.node_id; - +create view usernames + as + select username from users + union + select username from email_verification_codes; |