DH_Alumni/create.sql

7 lines
396 B
SQL

create table entries(id bigint auto_increment primary key, name varchar(255), mail varchar(255) unique,
year int(4), birthday date, verify bool, vocation varchar(255)
);
create table verify(id bigint primary key, uuid VARCHAR(36),foreign key verify(id) REFERENCES entries(id));
CREATE TRIGGER before_insert_verify BEFORE INSERT ON verify FOR EACH ROW SET new.uuid = uuid();