neal-words/words.sql

20 lines
451 B
MySQL
Raw Permalink Normal View History

2024-02-13 10:55:47 +01:00
CREATE TABLE words (
word text not null,
2024-02-13 10:59:33 +01:00
is_new boolean not null,
2024-02-13 10:55:47 +01:00
rank integer not null,
primary key (word)
);
CREATE TABLE combos (
x text not null,
y text not null,
z text not null,
primary key (x, y),
foreign key (x) references words(word),
foreign key (y) references words(word),
foreign key (z) references words(word)
);
2024-02-13 11:12:37 +01:00
insert into words (word, rank, is_new)
values ('Earth', 1, 0), ('Wind', 1, 0), ('Fire', 1, 0), ('Water', 1, 0);