You can click the Show Diff for Lines button ( ) to see the difference between the code that you added and the one from source code. If you click the highlighted line in the gutter, a small toolbar is displayed with the Show Diff for Lines button. For example, add a comment line to a routine or a trigger function. When you edit source code of any object, DataGrip tracks changes and highlights them in the gutter. See the difference between modified and stored versions The Database Changes tool window becomes available only after you change source code of an object. Select View | Tool Windows | Database Changes from the main menu. You can use migration scripts to add or remove a column, upgrade the database version, or change column properties.ĭataGrip can automatically generate a migration script, but you must check it before running. In the Object Migration dialog, verify that the migration script is correct and press OK.Ī migration script is code that changes all database or a part of it. The Migration dialog displays a migration script for the object. When you press the Submit button ( ) in the Database changes tool window, you see the Migration dialog. (Optional) In the Database Changes tool window ( View | Tool Windows | Database Changes), double-click the modified object to open a difference viewer and verify your changes. Right-click an object and select Navigation | Go to DDL. The IDE will generate a migration script with your changes, prompt you to verify it, and then execute it in the database. You can update the source code of database objects by directly editing their DDL CREATE scripts and submitting your changes in the editor. You can select between the following options:Įxcept System Schemas: download source code for all the objects except for system schemas.Īll Schemas: download all the available source code. Right-click the selection and navigate to Load Sources. Select one or more data sources for which you want to download source code. In the Database Explorer Command 1 ( View | Tool Windows | Database Explorer), click the Data Source Properties icon ( ). You can open data source properties by using one of the following options: You can manage this process in the data source properties. Load source code for a data sourceĭataGrip retrieves the source code for a data source during the introspection. The Database Changes tool window displays a summary of all your changes. The IDE will generate a migration script and execute it in the database. You can update the source code of database objects directly by editing their DDL and submitting your changes. This information is used to show the objects in the Database Explorer, display their DDL, suggest them during completion, and in other features for code assistance. Updating source codeĭataGrip retrieves the information about a database during the introspection process. Every modification that you make to these objects in the editor is saved as a local version of the object source code. These objects might be triggers, procedures, functions, views, or other objects. DataGrip tracks changes that you make to objects that store their source code in the database.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |