DH_Alumni/create.sql

8 lines
467 B
SQL

create table entries(id bigint auto_increment primary key, name varchar(255), mail varchar(255),
year int(4), birthday date, verify bool, vocation varchar(255), creation DATE,
location varchar(100), phone varchar(50)
);
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();