Tables should be removed if model changes are performed to them. for each data model deploy the table file or files.deploy the schema creation files, \i schema_create.sql.deploy the database creation file, for instance from the psql prompt: \i db_create.sql.The files should be deployed in the following oder: It is assumed that the DDL is generated for the first time. Note: if you choose to have reference constraints please deploy the file accordingly.Connect to the server using psql or your favorite client and deploy the files based on the scenarios below.
Once files are generated or changed, you have to deploy or re-deploy them into your database server.
If schema name changes these files need to be run followed by the table onesĬode for all the children diagram entitiesĬode for all the children data model entities Unless the database name is changed these files needs to be run once In general the files are in pairs, one ending in _create for the object creation and one ending in _drop that will clear all objects from the database. StarUML TypeĮnumeration type named with the provided patternįor ease of use the files are generated following specific patterns. For instance BIGINT with length -1 will be mapped to BIGSERIAL.
The integer columns with length -1 will be mapped to the equivalent serial type.
The schema name is provided by the schema tag, default value being public if none is defined. Data Model: part of a Project, it gives the schema where all member tables will be created.If the tag is not present one will be created with the actual name. Project: provides the database name, either derived from its name or through the database tag.Follow the spteps above to re-generate with the new preferences.īelows are the rules to convert from ERD elements to DDL.Īll entities and columns are converted to create table statements as follow:.From Preferences/Postgresql DDL tab set your preferences and close.Click the menu ( Tools > Postgresql Model Generation > Configure.).If you want to change the generation options please follow the steps below.
Install this extension from Extension Manager of StarUML. This extension for StarUML support to generate DDL (Data Definition Language) from PostgreSQL.