Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Create table posts (
- post_id Int(10) NOT NULL AUTO_INCREMENT,
- author_id Char(36) NOT NULL,
- Primary Key (post_id)) ENGINE = InnoDB;
- Create table users (
- id Char(36) NOT NULL,
- username Varchar(16),
- Primary Key (id)) ENGINE = InnoDB;
- Alter table posts add Constraint rel_post_author Foreign Key (author_id) references users (id) on delete restrict on update restrict;
Add Comment
Please, Sign In to add comment