Modify
The following topic shows various ways to modify tables in IntelliJ IDEA.
In the Database tool window ( View | Tool Windows | Database) , right-click a table and select Modify Table.
In the Modify dialog, specify the table settings that you need.
Starting with IntelliJ IDEA 2022.1, you can change database-specific parameters of a table. The IDE generates fields for the Modify dialog automatically according to the properties received during the introspection. For example, by using this dialog in PostgreSQL, you can add and edit column check constraints.
In the Database tool window ( View | Tool Windows | Database) , right-click a table and select Modify Table.
In the Modify dialog, specify object settings that you need.
note
Column settings depend on the database vendor. For example, the Auto Increment checkbox is only available for SQLite, MySQL, and other vendors that allow it for a primary key column of an integer data type.
To protect a table from accidental modifications in the data editor, you can make the table read-only.
To enable read-only mode, click the Click to toggle the read-only attribute icon (
) in the lower-right corner of the editor.
To turn off read-only mode, click the Click to toggle the read-only attribute icon again.

note
Tables with the read-only status in the data editor can still be modified when using the database consoles or in the Database tool window.
To enable comments for databases and tables, navigate to View | Appearance | Details in Tree View.
To add comments for tables, select a table and press CtrlF6. In the Comment text field, add a table description.
To add comments for a database, open database settings CtrlAlt0S and add a database description in the Comment text field.
In the Database tool window ( View | Tool Windows | Database) , right-click an object and select Modify Table.
On the Grants tab, click the Add button (
).
In the user field, type the username. You can press CtrlSpace to use code completion in this field.
Click the grant field, from the drop-down near each privilege, select Grant or Grant with option. The Grant with option privilege means that a user can grant to or revoke from other users those privileges.
You can modify a table while you edit table data.
Double-click a table to open it in the data editor.
Press CtrlF6.
Modify data and click OK.
Press CtrlF5 to reload the page.
Thanks for your feedback!