Manage data sources
Data source is a location of data for your application. In PhpStorm, you can define the following data sources:
Database data source: operational databases that contain data (see Database connection ).
Data Definition Language (DDL) files: SQL files that contain data definition language statements.
Configure display options for data sources
You can group, assign a color, and filter objects in the Database tool window ( ).
Customize the view of objects in the Database tool window
To group, enable, or sort data sources, click the Show Options menu icon on the title bar of the Database tool window and select the necessary options.
In the Database tool window ( ), the view of the data source changes instantly.
Group data sources in folders
In the Database tool window ( ), select the necessary data source and press F6. Alternatively, right-click a data source and select Move to Folder.
If you do not have any folders, you will see the New Folder dialog. In the text field, type the folder name. You can use a forward slash (
/) to define nesting. For example, the
QA/Quickname will create the
Quickfolder inside the
If you have folders with grouped data sources, you will see the Move to Folder dialog. To create a new folder, select New Folder. To remove a data source from the folder, select Root folder.
Assign a color to a data source
To have better differentiation between production and test databases, you can assign a color to a data source.
In the Database tool window ( ), click the Data Source Properties icon .
Select the data source for which you want to assign a color.
Click the circle in the Name field to select a color.
Assign a color to query consoles and grids
The text data viewer can use the color of the data source. To set a color, right-click a data source and select Color Settings. In the Database Color Settings dialog, select the dialog and coloring options. To have the data source color applied for query consoles and grids, select the In console editors and grids checkbox.
Filter objects from the toolbar
To select the necessary objects, use the Filter icon on the toolbar .
Show comments for data sources and database objects
To enable descriptions for databases and tables, navigate to Descriptions in Tree Views.and select
To add comments for tables, select a table and press Ctrl+F6. In the Comment text field, add a table description.
To add comments for a database, open database settings Ctrl+Alt+S and add a database description in the Comment text field.