Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE `party` (
- id BIGINT UNSIGNED auto_increment PRIMARY KEY,
- name VARCHAR(40) UNIQUE NOT NULL
- );
- CREATE TABLE `character` (
- id BIGINT UNSIGNED auto_increment PRIMARY KEY,
- name VARCHAR(40) NOT NULL
- );
- CREATE TABLE `class` (
- id BIGINT UNSIGNED auto_increment PRIMARY KEY,
- name VARCHAR(20) NOT NULL
- );
- CREATE TABLE `makeup` (
- id BIGINT UNSIGNED auto_increment PRIMARY KEY,
- party BIGINT UNSIGNED NOT NULL,
- class BIGINT UNSIGNED NOT NULL,
- FOREIGN KEY (party) REFERENCES `party`(id),
- FOREIGN KEY (class) REFERENCES `class`(id)
- );
- CREATE TABLE `characterclass` (
- id BIGINT UNSIGNED auto_increment PRIMARY KEY,
- `character` BIGINT UNSIGNED NOT NULL,
- class BIGINT UNSIGNED NOT NULL,
- FOREIGN KEY (`character`) REFERENCES `character`(id),
- FOREIGN KEY (class) REFERENCES `class`(id)
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement