This section provides configuration options that affect the modeling functionality in MySQL Workbench (see the figure that follows). Modeling preferences include specific categories of options:
EER Modeler
-
Automatically reopen previous model at start
Select this check box if you want the model on which you previously worked to be automatically reopened when you start MySQL Workbench.
-
Force use of software based rendering for EER diagrams
MySQL Workbench uses OpenGL for rendering when available. However, due to faulty drivers, problems do occasionally occur. These issues can be resolved by selecting the software rendering option here.
-
Model undo history size: [
10
]You can limit the size of the undo history here. Set this value to
0
to have an unlimited undo history. Defaults to10
undo history operations. -
Auto-save model interval: [
1 minute
]An open model that has not been saved will automatically be saved after this period. On loading a model file, MySQL Workbench notifies you if the file was not previously saved correctly (possibly due to an unexpected shutdown or power failure). MySQL Workbench can then attempt to recover the last autosaved version. For automatic recovery to be available on a new file, save the file at least one time.
Sets default values for modeling object names (see the figure that follows).
The following tables show the object names and their default values.
Column Defaults
Object Name | Default Value |
---|---|
PK Column Name |
id%table% |
PK Column Type |
INT |
Column Name |
%table%col |
Column Type |
VARCHAR(45) |
Foreign Key/Relationship Defaults
Object Name | Default Value |
---|---|
FK Name |
fk%stable_%dtable% |
Column Name |
%table%_%column% |
ON UPDATE |
NO ACTION |
ON DELETE |
NO ACTION |
Associative Table Name |
%stable%_has_%dtable% |
This preference group enables you to set model-related options specific to your MySQL version (see the figure that follows).
Model
-
Default Target MySQL Version: [
version
]A limited subset of validation procedures and table editor options are affected by this MySQL version number. Specify the version number in either
MAJOR
.MINOR
(8.0) orMAJOR
.MINOR
.RELEASE
(8.0.40) format.
Model Table Defaults
-
Default Storage Engine:
Tables created in MySQL Workbench are defined using this default storage engine. Values include:
InnoDB
,MyISAM
,ndbcluster
,MEMORY
,FEDERATED
,ARCHIVE
,CSV
,BLACKHOLE
, andMRG_MyISAM
.
Forward Engineering and Synchronization
-
SQL_MODE to be used in generated scripts:
Defines the
SQL_MODE
used by Forward Engineering and Synchronization. Defaults toONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
.
The following figure shows the preference options that apply to model-related diagrams.
All Objects
-
Expand New Objects
Enabled by default. Sets the initial state of newly created objects to expanded (or collapsed, if disabled).
-
Propagate Object Color Changes to All Diagrams
Enabled by default. If an object's
Figure
color is changed, all figures in all diagrams that represent the same object are also updated.
Tables
-
Show Column Types
Enabled by default. Shows the column types along their names in table figures.
-
Show Schema Name
Shows the owning schema name in the title bar of table figures.
Max. Length of ENUMs and SETs to Display: [
20
]-
Show Column Flags
Shows column flags, such as NOT NULL and UNSIGNED, along their names in table figures.
Max. Number of Columns to Display [
30
] Larger tables will be truncated.
Routines
Trim Routine Names Longer Than [
20
] characters.
Relationships/Connections
Draw Line Crossings (slow in large diagrams)
Show Captions
Center Captions Over Line
Use this preference group to set the available colors for the objects that appear on an EER diagram canvas. As the following figure shows, you can also add colors as needed.
For related information, see Section 3.1, “User Accessibility Options”.
Color Presets
These are the available colors used while modeling, and they are divided into two sections. First, the colors used when creating tables and views. The second section are available colors for items such as layers and notes.
Fonts
These define the fonts and font sizes used while modeling.