Project structure
The PostgreSQL project has the following structure:
.
├─ EXTENSION
└─ SCHEMA
├─ schema_name
├─ ...
└─ another_schema_name
├─ another_schema_name.sql
├─ DOMAIN
├─ FTS_CONFIGURATION
├─ FTS_DICTIONARY
├─ FTS_PARSER
├─ FTS_TEMPLATE
├─ FUNCTION
├─ OPERATOR
├─ PROCEDURE
├─ SEQUENCE
├─ STATISTICS
├─ TABLE
│ └─ table_name.sql
├─ TYPE
│ └─ type_name.sql
└─ VIEW
└─ view_name.sql
schema_name … another_schema_name - schema names.
another_schema_name.sql - an obligatory file with schema definition, the name should be identical to the directory name.
table_name.sql, type_name.sql, view_name.sql - files with objects’ definition. The names are specified without schema names.
all the overloaded functions are stored in a single file. For example, the functions public.func(int) and public.func(text) will be located in SCHEMA/public/FUNCTION/func.sql.
definition of indexes, constraints, triggers and rules are located in the files of parent objects. For example, index public.ii for the public.t1 table will be located in SCHEMA/public/TABLE/t1.sql.
The MS SQL project has the following structure:
.
├─ Assemblies
├─ Functions
├─ Security
│ ├─ Roles
│ ├─ Schemas
│ │ └─ schema_name.sql
│ └─ Users
├─ Sequences
├─ Stored Procedures
├─ Tables
│ └─ schema_name.table_name.sql
├─ Types
│ └─ schema_name.type_name.sql
└─ Views
└─ schema_name.view_name.sql
schema_name.sql - an obligatory file with schema definition.
schema_name.table_name.sql, schema_name.type_name.sql, schema_name.view_name.sql - files with object definitions объектов. Names are specified with the schema name.
definitions of indexes, constraints, triggers are located in the files of parent objects. For example, index dbo.ii for the dbo.t1 table will be located in Tables/dbo.t1.sql.
The ClickHouse project has the following structure:
.
├─ DATABASE
│ └─ database_name
│ ├─ database_name.sql
│ ├─ TABLE
│ │ └─ table_name.sql
│ ├─ DICTIONARY
│ │ └─ dictionary_name.sql
│ └─ VIEW
│ └─ view_name.sql
├─ FUNCTION
│ └─ function_name.sql
├─ POLICY
│ └─ policy_name.sql
├─ USERS
│ └─ user_name.sql
└─ ROLE
└─ role_name.sql
database_name.sql - an obligatory file with schema definition, the name should be identical to the directory name.
table_name.sql, dictionary_name.sql, view_name.sql - files with objects’ definition. The names are specified without schema names in the directory of a corresponding database.
function_name.sql, policy_name.sql, user_name.sql, role_name.sql - files with objects’ definition.
definitions of indices and constraints are located in the files of parent objects. For example, the check_t1 constrain for the default.t1 table will be located in DATABASE/default/TABLE/t1.sql
Apart from this, a project may contain the following directories and files:
The MIGRATION directory contains saved migration scripts. Automatic saving and deletion of migration scripts in this directory can be configured on the DB update settings page.
The OVERRIDES directory contains files for overriding object properties. The internal structure of this directory duplicates the project structure. You can save property overrides by selecting the corresponding option when saving objects to the project. Currently, overriding of database object privileges and owners is supported.
The .settings directory contains project settings.
The .dependencies file stores the list of libraries as an XML file. It can be edited via project settings.
The .pgcodekeeper file is a marker of a pgCodeKeeper project.
The .pgcodekeeperdependencies file contains implicit object dependencies. It can be edited via project settings.
The .pgcodekeeperignore file contains object ignoring rules. A detailed description of working with lists can be found in the Ignore List section. It can be edited via project settings.
The .pgcodekeeperignoreschema file contains schema ignoring rules. A detailed description of working with lists can be found in the Ignoring schemas when downloading section. It can be edited via project settings.
The .project file is a marker of an Eclipse project.
The structure.properties file stores the project structure. It can be edited via Project Normalization.