Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
rkhaotix committed May 14, 2018
2 parents 9b91a21 + fcb3121 commit 3db789f
Show file tree
Hide file tree
Showing 484 changed files with 13,010 additions and 8,043 deletions.
179 changes: 179 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

76 changes: 47 additions & 29 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,49 @@
v0.9.0
v0.9.1
------

<em>Release date: September 1st, 2017</em><br/>
<em>Changes since: <strong>v0.9.0-beta2</strong></em><br/>

<strong>Summary:</strong> after one year and three months of hard work we finally have the stable release 0.9.0. This version does not bring extraordinary changes or improvements compared to the alphas and betas but it closes one more development cycle delivering an even more refined product to our users. In order to give an idea on how pgModeler have changed since last year if we place togheter all change logs from the beggining of 0.9.0 development we would have: 175 log entries being 51 new features, 58 changes/improvements, 68 bug fixes. These numbers only indicates how the project is being constantly enhanced through the years.<br/>

About some of the new features, pgModeler now supports curved relationship lines in order to improve the model's visualization. By default, for new installations, this option comes activated but it can be toggled in the general settings. Another feature requested long ago and now is available is the ability to choose the UI language instead of rely only in the OS default language. One more enhacement is the possibility of copying and pasting text from one data manipulation dialog to another. This comes to be handy mainly when the user needs to copy data between tables when they reside in different databases.<br/>

Finally, small fixes and changes have been implemented as you can see below. The complete change history is in the file CHANGELOG.md.<br/>

* [New] Added the ability to paste text from clipboard to data grid in DataManipulationForm.
* [New] Added a new sample model donated by the maintainers of 3D City DB project.
* [New] Added the language "internal" to the set of system languages available when creating a new model.
* [New] Added support to override the default language settings via GeneralConfigWidget.
* [New] Added support to toggle curved relationship lines in GeneralConfigWidget.
* [Change] Improved the MetadataHandlingForm enabling user to only extract metada to a backup file.
* [Change] Minor adjustments in the graphical points when relationships are selected.
* [Change] Changed the default action to reset label's position from middle button click to Alt + Ctrl + left click.
* [Change] Minor enhancement in auto arrange feature to avoid breaking lines when curved relationship lines are enabled.
* [Change] Minor adjustment in the methods which automatically resize dialogs depending on the resolution.
* [Change] Changed the default font for objects and source code.
* [Fix] Fixed the catalog query for event triggers.
* [Fix] Fixed the icons and labels of the "Select all" submenu in ModelWidget.
* [Fix] Fixed a rare crash when configuring self relationships.
* [Fix] Minor fix when rendering self n:n relationships.
* [Fix] Minor fix in the HintTextWidget to resize more properly according to the held text.
* [Fix] Minor fix in default confs for source code font style.
* [Fix] Fixed the generation of objects style configuration file that was missing constraints settings.
* [Fix] Fixed a bug in the index / exclude constraint import which was not creating expressions of these objects correctly and sometimes trucating them.
<em>Release date: May 14, 2018</em><br/>
<em>Changes since: <strong>v0.9.1-beta1</strong></em><br/>

<strong>Summary:</strong> after eight months of hard work we finally have the stable release 0.9.1. This version is a mark in the pgModeler's development and so important as the release 0.8.2 in terms of improvements because it brought features requested long ago and that will make pgModeler even better to work with, being some of them: crow's foot notation support, multiple relationships for the same table pair, support to row level security, identity columns and much more. <br/>

For this release specifically (considering only the work after 0.9.1-beta1), the golden rule was to fix bugs, adjust the current features and introduce few new things and thus was done: 21 bug fixes, 14 changes/improvements and 7 new features.

The majority of new features are related to the CLI which received the ability to import and diff databases which can make it even better to integrate to automtated deployment processess or run quick tasks over models or databases without the need to open pgModeler's GUI.<br/>

Some important improvements were done in the overall performance of the SQL tool. The query execution and results display are a lot better now being quicker and less eager in terms of memory consumption avoiding crashes when querying large tables. The data manipulation also received a patch that makes the row duplication more efficient.<br/>

Now, for the fixes, another patch was introduced in order to resize correctly dialogs in HiDPI/Retina displays. Several reverse engineering bugs were fixes and now databases are imported more precisely compared to previous releases. Lastly, a bug that seems to happen only on macOS while dealing with large models is finally fixed and was related to some running threads messing around with the main process avoiding it to correctly save the model and causing hang ups sometimes.<br/>

The whole set of changes of this release (considering the alpha and beta stages) has 152 entries being 43 new features, 47 changes/improvements and 62 bug fixes. Below we highlight some of news for the work since 0.9.1-beta1, for the complete list of changes, please, take a look into the CHANGELOG.md. <br/>

* [New] Added support to line selection by clicking and moving the mouse over the line numbers widget in any source code field.
* [New] The validator now checks if the model has columns referencing spatial data types and creates the postgis extension automatically when fixing the model.
* [New] Added support to RESTART IDENTITY on truncate tables in DatabaseExplorerWidget.
* [New] Added support to diff operation in CLI.
* [New] Added support to import database from CLI.
* [New] Adding missing types regrole and regnamespace.
* [Change] Improved the copy/duplicate operation in order to copy rules, index, trigger and policies together to their parents.
* [Change] Added column names to the code completion widget used in the filter widget at DataManipulationForm.
* [Change] Improved the SQLExecutionWidget in such way that it'll display large amount of data more quickly and consuming less memory.
* [Change] Minor improvement in SQLExecutionWidget to show the amount of time took to run a query.
* [Change] Minor improvement in the text find widgets in SQL tool in order to make them closable via dedicated button.
* [Change] Improved the set tag operation in ModelWidget in order to cleanup the assigned tags to a set of objects.
* [Change] Refactored all the CLI options.
* [Change] Improved the performance of the row duplication action in DataManipulationForm.
* [Change] Improved the performance of "Move to schema" operation.
* [Change] Changed the behaviour of select and fade buttons in ObjectFinderWidget in such way to enable the user to select/fade the objects in the listing (or not included in the results).
* [Fix] Fixed a bug when import identity columns in certain cases when the identity column was followed by another column which data type was not accepted for identity, e.g, text after smallint.
* [Fix] Fixed the tab behavior on comment box in all editing forms of database objects.
* [Fix] Fixed the catalog query for user defined types.
* [Fix] Fixed the import of user defined types which names contains uppercase characters.
* [Fix] Fix window scaling on HiDPI/Retina screens.
* [Fix] Fixed a bug in ModelExportHelper that was failing to remane the database when the command appeared.
* [Fix] Fixed a bug in CollationWidget that was referencing the collation attributes LC_??? using the wrong constant.
* [Fix] Fixed the behaviour of the message box that warns about the need of validate the model prior to export, save or diff. Now rejecting the dialog (i.e. closing it) will be considered that the user wants to proceed with the pending operation even with an invalid model.
* [Fix] Fixed the import of comments for constraints,triggers, index and rules.
* [Fix] Fixed a bug in the aggregate import process.
* [Fix] Minor fix in DataManipulationForm to avoid the generation of a where clause when the filter is filled only with spaces.
* [Fix] Minor fix in the magnfier tool to use the same render hints as the canvas viewport.
* [Fix] Fixed a bug in the diff process that was trying to recreate the whole database when the "Force recreation" option was set.
* [Fix] Fixed a bug when showing the source of tables in DatabaseExplorerWidget when these objects have permissions assigned.
* [Fix] Fixed the saving process for large models by stopping the threads related to temp models saving while the model file is being written.
10 changes: 5 additions & 5 deletions conf/defaults/example.dbm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
CAUTION: Do not modify this file unless you know what you are doing.
Unexpected results may occur if the code is changed deliberately.
-->
<dbmodel pgmodeler-ver="0.9.0-beta" author="Raphael Araújo e Silva" last-position="0,0" last-zoom="1">
<dbmodel pgmodeler-ver="0.9.1-alpha" author="Raphael Araújo e Silva" last-position="0,0" last-zoom="1">
<database name="exampledb" encoding="UTF8">
<comment><![CDATA[Example Database Model]]></comment>
</database>
Expand Down Expand Up @@ -36,7 +36,7 @@ CAUTION: Do not modify this file unless you know what you are doing.
<definition><![CDATA[SELECT 1+1;]]></definition>
</function>

<table name="table">
<table name="table" hide-ext-attribs="true">
<schema name="public"/>
<tag name="sample tag"/>
<position x="20" y="20"/>
Expand Down Expand Up @@ -65,9 +65,9 @@ CAUTION: Do not modify this file unless you know what you are doing.
</idxelement>
</index>

<table name="table1">
<table name="table1" hide-ext-attribs="true">
<schema name="public"/>
<position x="366" y="265"/>
<position x="396" y="312"/>
<column name="column" not-null="true">
<type name="serial" length="1"/>
</column>
Expand Down Expand Up @@ -159,7 +159,7 @@ CAUTION: Do not modify this file unless you know what you are doing.
<comment><![CDATA[Protected Textbox]]></comment>
</textbox>

<table name="table2" oids="true">
<table name="table2" oids="true" hide-ext-attribs="true">
<schema name="public"/>
<position x="380" y="21"/>
<column name="column" not-null="true">
Expand Down
2 changes: 1 addition & 1 deletion conf/defaults/pgmodeler.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
history-max-length="1000"
use-curved-lines="true"/>
<dock-widgets>
<widget id="objectfinder" regexp="false" case-sensitive="false" exact-match="false" highlight-objects="true"/>
<widget id="objectfinder" regexp="false" case-sensitive="false" exact-match="false" select-objects="true" fadein-objects="true"/>
<widget id="validator" sql-validation="true" use-unique-names="true" pgsql-version="Autodetect"/>
<widget id="sqltool" show-attributes-grid="true" show-source-pane="true"/>
</dock-widgets>
Expand Down
18 changes: 17 additions & 1 deletion conf/defaults/snippets.conf
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,22 @@ $br

<snippet id="opf_create" label="Create operator family" object="opfamily" parsable="true" placeholders="true">
<![CDATA[[CREATE OPERATOR FAMILY ] {name} [ USING ] {index-type} $br]]>
</snippet>

<snippet id="pol_alter" label="Alter policy" object="policy" parsable="true" placeholders="true">
<![CDATA[[ALTER POLICY ] {name} [ ON ] {table}
$br $tb [TO ] {roles}
$br $tb [USING (] {using-exp} [)]
$br $tb [WITH CHECK (] {check-exp} [)] ; $br]]>
</snippet>

<snippet id="pol_create" label="Create policy" object="policy" parsable="true" placeholders="true">
<![CDATA[[CREATE POLICY ] {name} [ ON ] {table}
$br $tb [AS { PERMISSIVE | RESTRICTIVE } -- Only in PostgreSQL 10+ ]
$br $tb [FOR ] {command}
$br $tb [TO ] {roles}
$br $tb [USING (] {using-exp} [)]
$br $tb [WITH CHECK (] {check-exp} [)];$br]]>
</snippet>

<snippet id="rol_create" label="Create role" object="role" parsable="true" placeholders="true">
Expand Down Expand Up @@ -857,5 +873,5 @@ $br
[FROM ] $ob $sp {role} [ | PUBLIC ] $cb $sp $br
$ob [ CASCADE | RESTRICT ] $cb
$br]]>
</snippet>
</snippet>
</snippets>
23 changes: 20 additions & 3 deletions conf/defaults/sql-highlight.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
<group name="functions"/>
<group name="operators"/>
<group name="numbers"/>
<group name="strings"/>
<group name="multi-line-strings"/>
<group name="single-line-strings"/>
<group name="schema-qualified"/>
<group name="keywords"/>
<group name="datatypes"/>
Expand Down Expand Up @@ -54,10 +55,17 @@
<element regexp="true" value="((\-)|(\+))?([0-9])+((\.)([0-9]+))?"/>
</group>

<group name="strings" case-sensitive="false"
<group name="multi-line-strings" case-sensitive="false"
bold="false" italic="false" underline="false"
foreground-color="#ff0000">
<element regexp="true" value="(&apos;)(.)*(&apos;)"/>
<element regexp="true" value="(&apos;)(.)*(\n)"/>
<element regexp="true" value="(.)*(&apos;)(\n)*" type="final-exp"/>
</group>

<group name="single-line-strings" case-sensitive="false"
bold="false" italic="false" underline="false"
foreground-color="#ff0000">
<element regexp="true" value="(&apos;)(.)*(&apos;)"/>
</group>

<group name="single-line-comment" case-sensitive="false"
Expand Down Expand Up @@ -97,6 +105,7 @@
<element value="AGGREGATE"/>
<element value="ALIGNMENT"/>
<element value="ALL"/>
<element value="ALLOW_CONNECTIONS"/>
<element value="ALSO"/>
<element value="ALTER"/>
<element value="ALWAYS"/>
Expand All @@ -112,6 +121,7 @@
<element value="BEGIN"/>
<element value="BETWEEN"/>
<element value="BY"/>
<element value="BYPASSRLS"/>
<element value="BUFFERING"/>
<element value="CACHE"/>
<element value="CALLED"/>
Expand Down Expand Up @@ -186,10 +196,12 @@
<element value="FIRST"/>
<element value="FOLLOWING"/>
<element value="FOR"/>
<element value="FORCE"/>
<element value="FOREIGN"/>
<element value="FROM"/>
<element value="FULL"/>
<element value="FUNCTION"/>
<element value="GENERATED"/>
<element value="GLOBAL"/>
<element value="GRANT"/>
<element value="GROUP"/>
Expand Down Expand Up @@ -219,7 +231,9 @@
<element value="INTERSECT"/>
<element value="INTO"/>
<element value="INVOKER"/>
<element value="IDENTITY"/>
<element value="IS"/>
<element value="IS_TEMPLATE"/>
<element value="JOIN"/>
<element value="KEY"/>
<element value="LANGUAGE"/>
Expand All @@ -229,6 +243,7 @@
<element value="LEAKPROOF"/>
<element value="LEFT"/>
<element value="LEFTARG"/>
<element value="LEVEL"/>
<element value="LIKE"/>
<element value="LIMIT"/>
<element value="LOCAL"/>
Expand Down Expand Up @@ -274,6 +289,8 @@
<element value="PARTIAL"/>
<element value="PASSEDBYVALUE"/>
<element value="PASSWORD"/>
<element value="PERMISSIVE"/>
<element value="POLICY"/>
<element value="PRECEDING"/>
<element value="PREFERRED"/>
<element value="PRESERVE"/>
Expand Down
3 changes: 2 additions & 1 deletion conf/dtd/pgmodeler.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
<!ATTLIST widget regexp (false|true) "false">
<!ATTLIST widget exact-match (false|true) "false">
<!ATTLIST widget case-sensitive (false|true) "false">
<!ATTLIST widget highlight-objects (false|true) "false">
<!ATTLIST widget select-objects (false|true) "false">
<!ATTLIST widget fadein-objects (false|true) "false">
<!ATTLIST widget show-attributes-grid (false|true) "true">
<!ATTLIST widget show-source-pane (false|true) "true">

Expand Down
2 changes: 1 addition & 1 deletion conf/dtd/relationships.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!ELEMENT relationships (connection, foreign-keys, name-patterns)>

<!ELEMENT connection EMPTY>
<!ATTLIST connection mode (fk-to-pk|center-pnts) "fk-to-pk">
<!ATTLIST connection mode (fk-to-pk|center-pnts|table-edges|crows-foot) "fk-to-pk">

<!ELEMENT foreign-keys EMPTY>
<!ATTLIST foreign-keys deferrable (false|true) "false">
Expand Down
2 changes: 1 addition & 1 deletion conf/dtd/snippets.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
<!ATTLIST snippet object (column|constraint|function|trigger|index|rule|table|view|domain|
schema|aggregate|operator|sequence|role|conversion|cast|
language|usertype|tablespace|opfamily|opclass|database|collation|
extension|eventtrigger|general) "general">
extension|eventtrigger|general|policy) "general">

10 changes: 5 additions & 5 deletions conf/example.dbm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
CAUTION: Do not modify this file unless you know what you are doing.
Unexpected results may occur if the code is changed deliberately.
-->
<dbmodel pgmodeler-ver="0.9.0-beta" author="Raphael Araújo e Silva" last-position="0,0" last-zoom="1">
<dbmodel pgmodeler-ver="0.9.1-alpha" author="Raphael Araújo e Silva" last-position="0,0" last-zoom="1">
<database name="exampledb" encoding="UTF8">
<comment><![CDATA[Example Database Model]]></comment>
</database>
Expand Down Expand Up @@ -36,7 +36,7 @@ CAUTION: Do not modify this file unless you know what you are doing.
<definition><![CDATA[SELECT 1+1;]]></definition>
</function>

<table name="table">
<table name="table" hide-ext-attribs="true">
<schema name="public"/>
<tag name="sample tag"/>
<position x="20" y="20"/>
Expand Down Expand Up @@ -65,9 +65,9 @@ CAUTION: Do not modify this file unless you know what you are doing.
</idxelement>
</index>

<table name="table1">
<table name="table1" hide-ext-attribs="true">
<schema name="public"/>
<position x="366" y="265"/>
<position x="396" y="312"/>
<column name="column" not-null="true">
<type name="serial" length="1"/>
</column>
Expand Down Expand Up @@ -159,7 +159,7 @@ CAUTION: Do not modify this file unless you know what you are doing.
<comment><![CDATA[Protected Textbox]]></comment>
</textbox>

<table name="table2" oids="true">
<table name="table2" oids="true" hide-ext-attribs="true">
<schema name="public"/>
<position x="380" y="21"/>
<column name="column" not-null="true">
Expand Down
2 changes: 1 addition & 1 deletion conf/pgmodeler.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
history-max-length="1000"
use-curved-lines="true"/>
<dock-widgets>
<widget id="objectfinder" regexp="false" case-sensitive="false" exact-match="false" highlight-objects="true"/>
<widget id="objectfinder" regexp="false" case-sensitive="false" exact-match="false" select-objects="true" fadein-objects="true"/>
<widget id="validator" sql-validation="true" use-unique-names="true" pgsql-version="Autodetect"/>
<widget id="sqltool" show-attributes-grid="true" show-source-pane="true"/>
</dock-widgets>
Expand Down
3 changes: 2 additions & 1 deletion conf/schemas/widget.sch
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ $tb [<widget]
[ regexp="] %if {regexp} %then true %else false %end ["]
[ case-sensitive="] %if {case-sensitive} %then true %else false %end ["]
[ exact-match="] %if {exact-match} %then true %else false %end ["]
[ highlight-objects="] %if {highlight-objects} %then true %else false %end ["]
[ select-objects="] %if {select-objects} %then true %else false %end ["]
[ fadein-objects="] %if {fadein-objects} %then true %else false %end ["]
%else
%if {sqltool} %then
[ id="sqltool"]
Expand Down
18 changes: 17 additions & 1 deletion conf/snippets.conf
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,22 @@ $br

<snippet id="opf_create" label="Create operator family" object="opfamily" parsable="true" placeholders="true">
<![CDATA[[CREATE OPERATOR FAMILY ] {name} [ USING ] {index-type} $br]]>
</snippet>

<snippet id="pol_alter" label="Alter policy" object="policy" parsable="true" placeholders="true">
<![CDATA[[ALTER POLICY ] {name} [ ON ] {table}
$br $tb [TO ] {roles}
$br $tb [USING (] {using-exp} [)]
$br $tb [WITH CHECK (] {check-exp} [)] ; $br]]>
</snippet>

<snippet id="pol_create" label="Create policy" object="policy" parsable="true" placeholders="true">
<![CDATA[[CREATE POLICY ] {name} [ ON ] {table}
$br $tb [AS { PERMISSIVE | RESTRICTIVE } -- Only in PostgreSQL 10+ ]
$br $tb [FOR ] {command}
$br $tb [TO ] {roles}
$br $tb [USING (] {using-exp} [)]
$br $tb [WITH CHECK (] {check-exp} [)];$br]]>
</snippet>

<snippet id="rol_create" label="Create role" object="role" parsable="true" placeholders="true">
Expand Down Expand Up @@ -857,5 +873,5 @@ $br
[FROM ] $ob $sp {role} [ | PUBLIC ] $cb $sp $br
$ob [ CASCADE | RESTRICT ] $cb
$br]]>
</snippet>
</snippet>
</snippets>
Loading

0 comments on commit 3db789f

Please sign in to comment.