Skip to content

Commit

Permalink
fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
takeshi.nakata committed Nov 14, 2019
1 parent 748761c commit 7078022
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,6 @@ CREATE TABLE `friends` (
) ENGINE = InnoDB, DEFAULT CHARACTER SET = utf8mb4;
```
```
cat sample.sql
CREATE TABLE `users` (
`id` VARCHAR (36) NOT NULL DEFAULT '',
`name` VARCHAR (255) NOT NULL DEFAULT '',
`uid` VARCHAR (255) NOT NULL,
`created_at` DATETIME NOT NULL,
`updated_at` DATETIME NOT NULL,
PRIMARY KEY (`id`),
UNIQUE `idx_users_uid` (`uid`)
) ENGINE = InnoDB, DEFAULT CHARACTER SET = utf8mb4;
CREATE TABLE `friends` (
`id` BIGINT (20) NOT NULL AUTO_INCREMENT,
`user_id` VARCHAR (36) NOT NULL,
`to_id` VARCHAR (36) NOT NULL,
`created_at` DATETIME NOT NULL,
`updated_at` DATETIME NOT NULL,
PRIMARY KEY (`id`),
UNIQUE `idx_friends_user_id_to_id` (`user_id`, `to_id`),
CONSTRAINT `fk_friends_users_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
CONSTRAINT `fk_friends_users_2` FOREIGN KEY (`to_id`) REFERENCES `users` (`id`)
) ENGINE = InnoDB, DEFAULT CHARACTER SET = utf8mb4;
go run cmd/ddlm2s/main.go -f sample.sql --interleave=true
CREATE TABLE `users` (
`user_id` STRING(36) NOT NULL,
Expand Down

0 comments on commit 7078022

Please sign in to comment.