forked from k1LoW/tbls
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request k1LoW#243 from k1LoW/mplus
Add er.font option for png/jpg ER diagram
- Loading branch information
Showing
137 changed files
with
1,592 additions
and
1,077 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# CamelizeTable | ||
|
||
## Description | ||
|
||
<details> | ||
<summary><strong>Table Definition</strong></summary> | ||
|
||
```sql | ||
CREATE TABLE `CamelizeTable` ( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`created` datetime NOT NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 | ||
``` | ||
|
||
</details> | ||
|
||
## Columns | ||
|
||
| Name | Type | Default | Nullable | Children | Parents | Comment | | ||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- | | ||
| id | bigint(20) | | false | | | | | ||
| created | datetime | | false | | | | | ||
|
||
## Constraints | ||
|
||
| Name | Type | Definition | | ||
| ---- | ---- | ---------- | | ||
| PRIMARY | PRIMARY KEY | PRIMARY KEY (id) | | ||
|
||
## Indexes | ||
|
||
| Name | Definition | | ||
| ---- | ---------- | | ||
| PRIMARY | PRIMARY KEY (id) USING BTREE | | ||
|
||
## Relations | ||
|
||
![er](CamelizeTable.png) | ||
|
||
--- | ||
|
||
> Generated by [tbls](https://github.com/k1LoW/tbls) |
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# testdb | ||
|
||
## Labels | ||
|
||
`サンプル` `tbls` | ||
|
||
## Tables | ||
|
||
| Name | Columns | Comment | Type | | ||
| ---- | ------- | ------- | ---- | | ||
| [CamelizeTable](CamelizeTable.md) | 2 | | BASE TABLE | | ||
| [comment_stars](comment_stars.md) | 6 | | BASE TABLE | | ||
| [comments](comments.md) | 6 | Comments<br>Multi-line<br>table<br>comment | BASE TABLE | | ||
| [hyphen-table](hyphen-table.md) | 3 | | BASE TABLE | | ||
| [logs](logs.md) | 7 | Auditログ | BASE TABLE | | ||
| [post_comments](post_comments.md) | 7 | post and comments View table | VIEW | | ||
| [posts](posts.md) | 7 | エントリ | BASE TABLE | | ||
| [user_options](user_options.md) | 4 | User options table | BASE TABLE | | ||
| [users](users.md) | 6 | Users table | BASE TABLE | | ||
|
||
## Relations | ||
|
||
![er](schema.png) | ||
|
||
--- | ||
|
||
> Generated by [tbls](https://github.com/k1LoW/tbls) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# comment_stars | ||
|
||
## Description | ||
|
||
<details> | ||
<summary><strong>Table Definition</strong></summary> | ||
|
||
```sql | ||
CREATE TABLE `comment_stars` ( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`user_id` int(11) NOT NULL, | ||
`comment_post_id` bigint(20) NOT NULL, | ||
`comment_user_id` int(11) NOT NULL, | ||
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
`updated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `user_id` (`user_id`,`comment_post_id`,`comment_user_id`), | ||
KEY `comment_stars_user_id_post_id_fk` (`comment_post_id`,`comment_user_id`), | ||
KEY `comment_stars_user_id_fk` (`comment_user_id`), | ||
CONSTRAINT `comment_stars_user_id_fk` FOREIGN KEY (`comment_user_id`) REFERENCES `users` (`id`), | ||
CONSTRAINT `comment_stars_user_id_post_id_fk` FOREIGN KEY (`comment_post_id`, `comment_user_id`) REFERENCES `comments` (`post_id`, `user_id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 | ||
``` | ||
|
||
</details> | ||
|
||
## Columns | ||
|
||
| Name | Type | Default | Nullable | Children | Parents | Comment | | ||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- | | ||
| id | bigint(20) | | false | | | | | ||
| user_id | int(11) | | false | | | | | ||
| comment_post_id | bigint(20) | | false | | [comments](comments.md) | | | ||
| comment_user_id | int(11) | | false | | [users](users.md) [comments](comments.md) | | | ||
| created | timestamp | CURRENT_TIMESTAMP | false | | | | | ||
| updated | timestamp | 0000-00-00 00:00:00 | false | | | | | ||
|
||
## Constraints | ||
|
||
| Name | Type | Definition | | ||
| ---- | ---- | ---------- | | ||
| comment_stars_user_id_fk | FOREIGN KEY | FOREIGN KEY (comment_user_id) REFERENCES users (id) | | ||
| comment_stars_user_id_post_id_fk | FOREIGN KEY | FOREIGN KEY (comment_post_id, comment_user_id) REFERENCES comments (post_id, user_id) | | ||
| PRIMARY | PRIMARY KEY | PRIMARY KEY (id) | | ||
| user_id | UNIQUE | UNIQUE KEY user_id (user_id, comment_post_id, comment_user_id) | | ||
|
||
## Indexes | ||
|
||
| Name | Definition | | ||
| ---- | ---------- | | ||
| comment_stars_user_id_fk | KEY comment_stars_user_id_fk (comment_user_id) USING BTREE | | ||
| comment_stars_user_id_post_id_fk | KEY comment_stars_user_id_post_id_fk (comment_post_id, comment_user_id) USING BTREE | | ||
| PRIMARY | PRIMARY KEY (id) USING BTREE | | ||
| user_id | UNIQUE KEY user_id (user_id, comment_post_id, comment_user_id) USING BTREE | | ||
|
||
## Relations | ||
|
||
![er](comment_stars.png) | ||
|
||
--- | ||
|
||
> Generated by [tbls](https://github.com/k1LoW/tbls) |
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# comments | ||
|
||
## Description | ||
|
||
Comments | ||
Multi-line | ||
table | ||
comment | ||
|
||
<details> | ||
<summary><strong>Table Definition</strong></summary> | ||
|
||
```sql | ||
CREATE TABLE `comments` ( | ||
`id` bigint(20) NOT NULL AUTO_INCREMENT, | ||
`post_id` bigint(20) NOT NULL, | ||
`user_id` int(11) NOT NULL, | ||
`comment` text NOT NULL COMMENT 'Comment\nMulti-line\r\ncolumn\rcomment', | ||
`created` datetime NOT NULL, | ||
`updated` datetime DEFAULT NULL, | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `post_id` (`post_id`,`user_id`), | ||
KEY `comments_user_id_fk` (`user_id`), | ||
KEY `comments_post_id_user_id_idx` (`post_id`,`user_id`) USING HASH, | ||
CONSTRAINT `comments_post_id_fk` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`), | ||
CONSTRAINT `comments_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Comments\nMulti-line\r\ntable\rcomment' | ||
``` | ||
|
||
</details> | ||
|
||
## Columns | ||
|
||
| Name | Type | Default | Nullable | Children | Parents | Comment | | ||
| ---- | ---- | ------- | -------- | -------- | ------- | ------- | | ||
| id | bigint(20) | | false | | | | | ||
| post_id | bigint(20) | | false | [comment_stars](comment_stars.md) | [posts](posts.md) | | | ||
| user_id | int(11) | | false | [comment_stars](comment_stars.md) | [users](users.md) | | | ||
| comment | text | | false | | | Comment<br>Multi-line<br>column<br>comment | | ||
| created | datetime | | false | | | | | ||
| updated | datetime | | true | | | | | ||
|
||
## Constraints | ||
|
||
| Name | Type | Definition | | ||
| ---- | ---- | ---------- | | ||
| comments_post_id_fk | FOREIGN KEY | FOREIGN KEY (post_id) REFERENCES posts (id) | | ||
| comments_user_id_fk | FOREIGN KEY | FOREIGN KEY (user_id) REFERENCES users (id) | | ||
| post_id | UNIQUE | UNIQUE KEY post_id (post_id, user_id) | | ||
| PRIMARY | PRIMARY KEY | PRIMARY KEY (id) | | ||
|
||
## Indexes | ||
|
||
| Name | Definition | | ||
| ---- | ---------- | | ||
| comments_post_id_user_id_idx | KEY comments_post_id_user_id_idx (post_id, user_id) USING BTREE | | ||
| comments_user_id_fk | KEY comments_user_id_fk (user_id) USING BTREE | | ||
| PRIMARY | PRIMARY KEY (id) USING BTREE | | ||
| post_id | UNIQUE KEY post_id (post_id, user_id) USING BTREE | | ||
|
||
## Relations | ||
|
||
![er](comments.png) | ||
|
||
--- | ||
|
||
> Generated by [tbls](https://github.com/k1LoW/tbls) |
Oops, something went wrong.
Oops, something went wrong.