Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add toc mark and update column data type format #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fivesmallq
Copy link

@fivesmallq fivesmallq commented May 30, 2016

add toc mark and update column data type format

@fivesmallq fivesmallq changed the title add toc add toc mark and update column data type format May 30, 2016
@philip
Copy link

philip commented Aug 10, 2016

This is a useful patch, FWIW I give it a 👍 Here's a diff against sakila:

--- before_patch.txt    2016-08-10 12:32:00.000000000 -0700
+++ after_patch.txt 2016-08-10 12:31:45.000000000 -0700
@@ -2,6 +2,8 @@

 Generated by MySQL Workbench Model Documentation v1.0.0 - Copyright (c) 2015 Hieu Le

+[TOC]
+
 ##Table: `actor`

 ###Description: 
@@ -140,7 +142,7 @@
 | `last_name` | VARCHAR(45) | Not null |   |   |
 | `email` | VARCHAR(50) |  | `NULL` |   |
 | `address_id` | SMALLINT | Not null |   |  **foreign key** to column `address_id` on table `address`. |
-| `active` |  | Not null | `TRUE` |   |
+| `active` | BOOLEAN | Not null | `TRUE` |   |
 | `create_date` | DATETIME | Not null |   |   |
 | `last_update` | TIMESTAMP |  | `CURRENT_TIMESTAMP` |   |

@@ -172,11 +174,11 @@
 | `language_id` | TINYINT | Not null |   |  **foreign key** to column `language_id` on table `language`. |
 | `original_language_id` | TINYINT |  | `NULL` |  **foreign key** to column `language_id` on table `language`. |
 | `rental_duration` | TINYINT | Not null | `3` |   |
-| `rental_rate` | DECIMAL | Not null | `4.99` |   |
+| `rental_rate` | DECIMAL(4,2) | Not null | `4.99` |   |
 | `length` | SMALLINT |  | `NULL` |   |
-| `replacement_cost` | DECIMAL | Not null | `19.99` |   |
-| `rating` | ENUM |  | `'G'` |   |
-| `special_features` | SET |  |   |   |
+| `replacement_cost` | DECIMAL(5,2) | Not null | `19.99` |   |
+| `rating` | ENUM('G','PG','PG-13','R','NC-17') |  | `'G'` |   |
+| `special_features` | SET('Trailers','Commentaries','Deleted Scenes','Behind the Scenes') |  |   |   |
 | `last_update` | TIMESTAMP | Not null | `CURRENT_TIMESTAMP` |   |


@@ -324,7 +326,7 @@
 | `customer_id` | SMALLINT | Not null |   |  **foreign key** to column `customer_id` on table `customer`. |
 | `staff_id` | TINYINT | Not null |   |  **foreign key** to column `staff_id` on table `staff`. |
 | `rental_id` | INT |  | `NULL` |  **foreign key** to column `rental_id` on table `rental`. |
-| `amount` | DECIMAL | Not null |   |   |
+| `amount` | DECIMAL(5,2) | Not null |   |   |
 | `payment_date` | DATETIME | Not null |   |   |
 | `last_update` | TIMESTAMP |  | `CURRENT_TIMESTAMP` |   |

@@ -386,7 +388,7 @@
 | `picture` | BLOB |  |   |   |
 | `email` | VARCHAR(50) |  | `NULL` |   |
 | `store_id` | TINYINT | Not null |   |  **foreign key** to column `store_id` on table `store`. |
-| `active` |  | Not null | `TRUE` |   |
+| `active` | BOOLEAN | Not null | `TRUE` |   |
 | `username` | VARCHAR(16) | Not null |   |   |
 | `password` | VARCHAR(40) |  | `NULL` |   |
 | `last_update` | TIMESTAMP | Not null | `CURRENT_TIMESTAMP` |   |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants