Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit inicial do repositório do pgModeler
- Loading branch information
0 parents
commit daa8f9f
Showing
562 changed files
with
82,409 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
*.[oa] | ||
*.so.* | ||
ui_*.h | ||
moc_*.cpp | ||
obj/* | ||
moc/* | ||
Makefile | ||
build/pgmodeler | ||
*.pro.user | ||
*.directory | ||
|
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,42 @@ | ||
pgModeler - PostgreSQL Database Modeler | ||
http://github.com/rkhaotix/pgmodeler | ||
|
||
Developed by: Raphael Araújo e Silva (rkhaotix@gmail.com) | ||
|
||
This document describes a simple way how to compile and run the pgModeler. Please read it carefully so that no step is forgotten compromising the entire process. | ||
|
||
Compiling Requirements | ||
------------------------- | ||
|
||
* GCC Development Tools | ||
* Qt 4.7.x library or above (qt.nokia.com) | ||
* LibXML2 library (www.xmlsoft.org) | ||
* libpq library (www.postgresql.org) | ||
|
||
Compiling | ||
---------- | ||
|
||
Before starting the compilation, check in the file 'pgmodeler.pro' if the variables GLOBAL_INCLUDES and GLOBAL_LIBS points to the correct paths relative to your system. Change the value of these variables only in the section for your operating system. | ||
To compile the pgModeler type (in the root folder of the source code): | ||
|
||
* $ qmake pgmodeler.pro | ||
* $ make | ||
|
||
If the build is successful the executable 'pgmodeler' will be created in the build/ directory. Copy it to the folder you want and do not forget to also copy the folders schemas/, conf/ and lang/ in the root directory of the project. | ||
|
||
Environment Variables | ||
--------------------- | ||
|
||
By default pgModeler accesses the folders schemas/, conf/ and lang/ on the working directory, but you can change this settings. Three own environment variables are used for this purpose. If you want to configure directories cited in deferent paths use the following variables: | ||
|
||
* PGMODELER_SCHEMAS_DIR -> stores the full path the directory schemas/ | ||
* PGMODELER_CONF_DIR -> stores the full path the directory conf/ | ||
* PGMODELER_LANG_DIR -> stores the full path the directory lang/ | ||
|
||
Additionally, the pgModeler need to know where to find the libraries required for the execution (Qt Library, LibXML and libpq) for which you should enter the full path in the variable LD_LIBRARY_PATH (Unix) or PATH (Windows), if not already configured. | ||
|
||
To provide the interface translation pgModeler checks the variable LANG (Unix). For use a specific translation, change the value of this variable. So far, the pgModeler only supports the languages Portuguese from Brazil (pt_BR) and U.S. English (en_US). | ||
|
||
Finally, as a form of convenience, the script 'start-pgmodeler.(sh | bat)' was created to assist the initialization of pgModeler so it is not necessary to call the executable directly or change the environment variables on your operating system. | ||
|
||
Note: You may need to edit the parameters of the script depending on configuration of your operating system. |
Large diffs are not rendered by default.
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,26 @@ | ||
Description | ||
----------- | ||
|
||
pgModeler - PostgreSQL Database Modeler | ||
Developed by: Raphael Araújo e Silva (rkhaotix@gmail.com) | ||
|
||
PostgreSQL Database Modeler, or simply, pgModeler is an open source CASE tool for modeling PostgreSQL databases that merges the classical concepts of modeling using entity-relationship diagrams with specific features that only PostgreSQL implements. The pgModeler translates the models created by the user to SQL code and apply them onto database clusters from version 8.0 to 9.1. | ||
|
||
Please, let me know how the pgModeler is working on your computer! Help to improve this project, give your feedback about the software or report any bug. | ||
|
||
Follow the pgModeler profile on Facebook (https://www.facebook.com/pgmodeler) or Twitter (https://twitter.com/pgmodeler) and be up-to-date with new features, fixes and releases. | ||
|
||
Compiling/Installation | ||
---------------------- | ||
|
||
For details about compilation and installation process see COMPILING.md (https://github.com/rkhaotix/pgmodeler/blob/master/COMPILING.md) for details. | ||
|
||
Warning | ||
------- | ||
|
||
Although this is first stable version of pgModeler it is recommended NOT EXPORT the models created directly to production environments. Not all possible code generation were tested in this way, is its your own risk export the models into environments that are not intended for testing. The project's author is not responsible for any possible loss of data due the inappropriate use of this tool. | ||
|
||
Licensing | ||
--------- | ||
|
||
This software is licensed under GNU General Public License 2.0. See LICENSE.md (https://github.com/rkhaotix/pgmodeler/blob/master/LICENSE.md) for details. |
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 @@ | ||
../conf/ |
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 @@ | ||
../lang/ |
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 @@ | ||
../schemas/ |
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,16 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
ATENÇÃO: Não modifique este arquivo diretamente no código a não ser que você saiba | ||
o que está fazendo. Resultados inesperados podem acontecer | ||
caso o código seja alterado deliberadamente. | ||
CAUTION: Do not modify this file directly on it's code unless you know what you are doing. | ||
Unexpected results may occur if the code is changed deliberately. | ||
--> | ||
<connections> | ||
<connection alias="local-db" host="localhost" port="5432" dbname="postgres" | ||
user="postgres" password="postgres" connect_timeout="2" | ||
sslmode="disable" | ||
/> | ||
|
||
</connections> |
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,16 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
ATENÇÃO: Não modifique este arquivo diretamente no código a não ser que você saiba | ||
o que está fazendo. Resultados inesperados podem acontecer | ||
caso o código seja alterado deliberadamente. | ||
CAUTION: Do not modify this file directly on it's code unless you know what you are doing. | ||
Unexpected results may occur if the code is changed deliberately. | ||
--> | ||
<connections> | ||
<connection alias="local-db" | ||
host="localhost" dbname="postgres" port="5432" | ||
user="postgres" password="postgres" connect_timeout="2" | ||
sslmode="disable"/> | ||
</connections> |
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,160 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
ATENÇÃO: Não modifique este arquivo a não ser que você saiba | ||
o que está fazendo. Resultados inesperados podem acontecer | ||
caso o código seja alterado deliberadamente. | ||
CAUTION: Do not modify this file unless you know what you are doing. | ||
Unexpected results may occur if the code is changed deliberately. | ||
--> | ||
<dbmodel author="Raphael Araújo e Silva"> | ||
<schema name="public"> | ||
</schema> | ||
|
||
<database name="exampledb" encoding="UTF8"> | ||
<comment>Example Database Model</comment> | ||
</database> | ||
|
||
<language name="sql" protected="true"/> | ||
<function name="trigger_func" | ||
window-func="false" | ||
returns-setof="false" | ||
behavior-type="CALLED ON NULL INPUT" | ||
function-type="IMMUTABLE" | ||
security-type="SECURITY DEFINER" | ||
execution-cost="20" | ||
row-amount="2500"> | ||
<schema name="public"/> | ||
<language name="sql" protected="true"/> | ||
<return-type> | ||
<type name="trigger"/> | ||
</return-type> | ||
<parameter name="param1" in="true"> | ||
<type name="integer"/> | ||
</parameter> | ||
<definition>SELECT 1+1;</definition> | ||
</function> | ||
|
||
<table name="table" oids="false"> | ||
<schema name="public"/> | ||
<position x="20" y="20"/> | ||
<column name="column" not-null="true"> | ||
<type name="serial"/> | ||
</column> | ||
<column name="column1"> | ||
<type name="text"/> | ||
</column> | ||
<column name="column2" not-null="true"> | ||
<type name="integer"/> | ||
</column> | ||
<column name="column3"> | ||
<type name="text"/> | ||
</column> | ||
<constraint name="table_pk" type="pk-constr" factor="10" table="public.table"> | ||
<columns names="column" ref-type="src-columns"/> | ||
</constraint> | ||
<constraint name="table_uq" type="uq-constr" factor="10" table="public.table"> | ||
<columns names="column1" ref-type="src-columns"/> | ||
</constraint> | ||
<constraint name="table_ck" type="ck-constr" table="public.table"> | ||
<expression> column1 > 0 </expression> | ||
</constraint> | ||
<index name="index" table="public.table" | ||
concurrent="true" unique="true" fast-update="false" | ||
index-type="hash" factor="90"> | ||
<idxelement nulls-first="false" asc-order="false"> | ||
<column name="column1"/> | ||
</idxelement> | ||
</index> | ||
</table> | ||
|
||
<table name="table1" oids="false" protected="true"> | ||
<schema name="public"/> | ||
<position x="422" y="24"/> | ||
<column name="column" not-null="true" protected="true"> | ||
<type name="serial"/> | ||
</column> | ||
<column name="column1" protected="true"> | ||
<type name="text"/> | ||
</column> | ||
<column name="column2" not-null="true" protected="true"> | ||
<type name="integer"/> | ||
</column> | ||
<column name="column3" protected="true"> | ||
<type name="text"/> | ||
</column> | ||
<constraint name="table_pk" type="pk-constr" factor="10" protected="true" table="public.table1"> | ||
<columns names="column" ref-type="src-columns"/> | ||
</constraint> | ||
<constraint name="table_uq" type="uq-constr" factor="10" protected="true" table="public.table1"> | ||
<columns names="column1" ref-type="src-columns"/> | ||
</constraint> | ||
<constraint name="table_ck" type="ck-constr" protected="true" table="public.table1"> | ||
<expression> column1 > 0 </expression> | ||
</constraint> | ||
<rule name="rule1" event-type="ON INSERT" | ||
exec-type="ALSO" protected="true"> | ||
<condition>column1 = 0</condition> | ||
<commands>UPDATE public.table1 SET column1 = 1</commands> | ||
</rule> | ||
<trigger name="trigger1" firing-type="BEFORE" per-line="false" | ||
ins-event="true" del-event="true" upd-event="true" trunc-event="false" protected="true"> | ||
<function signature="public.trigger_func(integer)"/> | ||
</trigger> | ||
</table> | ||
|
||
<relationship name="relationship" | ||
type="rel1n" protected="true" | ||
src-required="false" dst-required="false" | ||
table-name="relationship" | ||
src-table="public.table1" | ||
dst-table="public.table"> | ||
<column name="attribute"> | ||
<type name="integer"/> | ||
</column> | ||
<column name="attribute1"> | ||
<type name="integer"/> | ||
</column> | ||
<column name="attribute2"> | ||
<type name="integer"/> | ||
</column> | ||
|
||
|
||
</relationship> | ||
|
||
<view name="view" protected="true"> | ||
<schema name="public"/> | ||
<position x="320" y="250"/> | ||
<reference table="public.table" column="column1" alias="t1" column-alias="col1"/> | ||
<reference table="public.table1" column="column2" alias="t2" column-alias="col2"/> | ||
<reference alias="expr"> | ||
<expression>extract(month from now())</expression> | ||
</reference> | ||
<reference table="public.table1" alias="t3" column-alias="col3"/> | ||
<expression type="select-exp">0,1,2,3</expression> | ||
<expression type="from-exp">3,0</expression> | ||
</view> | ||
|
||
<relationship name="rel_view_table" | ||
type="reltv" | ||
src-required="false" dst-required="false" | ||
src-table="public.view" | ||
dst-table="public.table"/> | ||
|
||
<relationship name="rel_view_table1" | ||
type="reltv" | ||
src-required="false" dst-required="false" | ||
src-table="public.view" | ||
dst-table="public.table1"/> | ||
|
||
<textbox name="textbox"> | ||
<position x="20" y="250"/> | ||
<comment>Selected Textbox</comment> | ||
</textbox> | ||
|
||
<textbox name="textbox1" protected="true"> | ||
<position x="20" y="300"/> | ||
<comment>Protected Textbox</comment> | ||
</textbox> | ||
|
||
</dbmodel> |
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,57 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
ATENÇÃO: Não modifique este arquivo diretamente no código a não ser que você saiba | ||
o que está fazendo. Resultados inesperados podem acontecer | ||
caso o código seja alterado deliberadamente. | ||
CAUTION: Do not modify this file directly on it's code unless you know what you are doing. | ||
Unexpected results may occur if the code is changed deliberately. | ||
--> | ||
<objects-style> | ||
<global font="Dejavu Sans" size="8.0"/> | ||
<font id="table-name" color="#ffffff" italic="false" bold="true" underline="false"/> | ||
<font id="table-schema-name" color="#000000" italic="true" bold="false" underline="false"/> | ||
<font id="column" color="#000000" italic="false" bold="false" underline="false"/> | ||
<font id="object-type" color="#082061" italic="true" bold="true" underline="false"/> | ||
<font id="fk-column" color="#000000" italic="true" bold="false" underline="false"/> | ||
<font id="pk-column" color="#2b7dba" italic="true" bold="true" underline="false"/> | ||
<font id="uq-column" color="#000000" italic="true" bold="false" underline="false"/> | ||
<font id="nn-column" color="#000000" italic="true" bold="false" underline="false"/> | ||
<font id="prot-column" color="#ff0000" italic="true" bold="false" underline="false"/> | ||
<font id="inh-column" color="#3f9e51" italic="true" bold="false" underline="false"/> | ||
<font id="index" color="#082061" italic="true" bold="false" underline="false"/> | ||
<font id="rule" color="#082061" italic="true" bold="false" underline="false"/> | ||
<font id="trigger" color="#082061" italic="true" bold="false" underline="false"/> | ||
<font id="view-name" color="#ffffff" italic="false" bold="true" underline="false"/> | ||
<font id="view-schema-name" color="#000000" italic="true" bold="false" underline="false"/> | ||
<font id="ref-table" color="#000080" italic="true" bold="false" underline="false"/> | ||
<font id="ref-column" color="#000000" italic="true" bold="true" underline="false"/> | ||
<font id="alias" color="#800080" italic="false" bold="false" underline="false"/> | ||
<font id="attribute" color="#000000" italic="true" bold="false" underline="false"/> | ||
<font id="label" color="#000000" italic="false" bold="false" underline="false"/> | ||
<font id="constraints" color="#25682d" italic="true" bold="false" underline="false"/> | ||
<font id="pos-info" color="#000000" italic="false" bold="false" underline="false"/> | ||
|
||
<object id="table-title" fill-color="#4aa5ff,#2070c1" border-color="#000000"/> | ||
<object id="table-body" fill-color="#cecece,#fafafa" border-color="#000000"/> | ||
<object id="table-ext-body" fill-color="#fafafa,#cecece" border-color="#000000"/> | ||
<object id="label" fill-color="#cbfa95,#eeffe0" border-color="#3a7637"/> | ||
<object id="view-title" fill-color="#FFE1A6,#C28000" border-color="#000000"/> | ||
<object id="view-body" fill-color="#cecece,#fafafa" border-color="#000000"/> | ||
<object id="textbox" fill-color="#aee7e7,#c7f3f1" border-color="#759b9b"/> | ||
<object id="relationship" fill-color="#bebebe,#fafafa" border-color="#202020"/> | ||
<object id="attribute" fill-color="#ffa858,#db6700" border-color="#000000"/> | ||
<object id="column" fill-color="#fafafa,#bebebe" border-color="#000000"/> | ||
<object id="pk-column" fill-color="#fefae6,#ffde31" border-color="#000000"/> | ||
<object id="uq-column" fill-color="#ffb209,#c08d00" border-color="#000000"/> | ||
<object id="fk-column" fill-color="#fce5cc,#ff5d31" border-color="#000000"/> | ||
<object id="nn-column" fill-color="#d2e9ff,#5a9ee4" border-color="#000000"/> | ||
<object id="reference" fill-color="#d2e9ff,#5a9ee4" border-color="#000000"/> | ||
<object id="rule" fill-color="#4c4c98,#c5cbff" border-color="#000000"/> | ||
<object id="trigger" fill-color="#4c4c98,#c5cbff" border-color="#000000"/> | ||
<object id="index" fill-color="#4c4c98,#c5cbff" border-color="#000000"/> | ||
<object id="locker-body" fill-color="#ffff80,#c7c700" border-color="#808000"/> | ||
<object id="locker-arc" fill-color="#ffffff,#b2b2b2" border-color="#8e8e8e"/> | ||
<object id="obj-selection" fill-color="#023d86" border-color="#012149"/> | ||
<object id="pos-info" fill-color="#ffff80" border-color="#800000"/> | ||
</objects-style> |
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 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
ATENÇÃO: Não modifique este arquivo diretamente no código a não ser que você saiba | ||
o que está fazendo. Resultados inesperados podem acontecer | ||
caso o código seja alterado deliberadamente. | ||
CAUTION: Do not modify this file directly on it's code unless you know what you are doing. | ||
Unexpected results may occur if the code is changed deliberately. | ||
--> | ||
<pgmodeler> | ||
<configuration op-list-size="500" | ||
grid-size="20" | ||
autosave-interval="10" | ||
paper-type="4" | ||
paper-orientation="landscape" | ||
paper-margin="10,10,10,10" | ||
save-session="true" | ||
save-widgets="true"/> | ||
<widget-conf> | ||
<widget id="widget0" type="fileToolbar" position="top" visible="true"/> | ||
<widget id="widget1" type="editToolbar" position="top" visible="true"/> | ||
<widget id="widget2" type="viewToolbar" position="top" visible="true"/> | ||
<widget id="widget3" type="modelToolbar" position="bottom" visible="true"/> | ||
<widget id="widget4" type="objectsDock" position="right" visible="true"/> | ||
<widget id="widget5" type="operationsDock" position="right" visible="true"/> | ||
</widget-conf> | ||
</pgmodeler> |
Oops, something went wrong.