update
This commit is contained in:
34
init.sql
34
init.sql
@@ -1,8 +1,8 @@
|
||||
create table recruits
|
||||
(
|
||||
discord_id int(20) unsigned not null,
|
||||
nickname varchar(50) null,
|
||||
recruit tinyint(1) not null,
|
||||
discord_id bigint not null,
|
||||
nickname varchar(50) null,
|
||||
recruit tinyint(1) not null,
|
||||
id int auto_increment,
|
||||
constraint id
|
||||
unique (id),
|
||||
@@ -14,37 +14,31 @@ create table no_votes
|
||||
(
|
||||
id int auto_increment
|
||||
primary key,
|
||||
discord_id_recruit int(20) unsigned not null,
|
||||
discord_id_voter int(20) unsigned not null,
|
||||
reason longtext not null,
|
||||
discord_id_recruit bigint not null,
|
||||
discord_id_voter bigint not null,
|
||||
reason longtext not null,
|
||||
constraint no_votes_pk2
|
||||
unique (id),
|
||||
constraint no_votes_recruits_discord_id_fk
|
||||
foreign key (discord_id_recruit) references recruits (discord_id)
|
||||
);
|
||||
|
||||
create table yes_votes
|
||||
create table settings
|
||||
(
|
||||
id int auto_increment
|
||||
primary key,
|
||||
discord_id_recruit int(20) unsigned not null,
|
||||
discord_id_voter int(20) unsigned not null,
|
||||
constraint yes_votes_pk2
|
||||
unique (id),
|
||||
constraint yes_votes_recruits_discord_id_fk
|
||||
foreign key (discord_id_recruit) references recruits (discord_id)
|
||||
on delete cascade
|
||||
name varchar(40) not null,
|
||||
value int(20) unsigned not null
|
||||
);
|
||||
|
||||
create table yes_votes
|
||||
(
|
||||
id int auto_increment
|
||||
primary key,
|
||||
discord_id_recruit int(20) unsigned not null,
|
||||
discord_id_voter int(20) unsigned not null,
|
||||
discord_id_recruit bigint not null,
|
||||
discord_id_voter bigint not null,
|
||||
constraint yes_votes_pk2
|
||||
unique (id),
|
||||
constraint yes_votes_recruits_discord_id_fk
|
||||
foreign key (discord_id_recruit) references recruits (discord_id)
|
||||
on delete cascade
|
||||
);
|
||||
);
|
||||
|
||||
INSERT INTO settings (name, value) VALUES ("channel_voting", "");
|
||||
Reference in New Issue
Block a user