Where does IntelliJ IDEA store database console scripts?

I could not find the answer to these questions on SO despite a lengthy search. For some reason, I thought I saw it before.

Do you guys know in which IDEA the contents of the database console scripts are saved?

I thought it was in dataSources.ids , but I do not see scripts there, only connection settings.

+4
source share
3 answers

Try exploring the IntelliJ cache folder.

For me, I myself did not find the database scripts, but I found the history of all sql statements executed here:

 `c:\Users\$user\.IntelliJIdea13\system\userHistory\*.xml` 

(Am on IntelliJ Idea EAP).

+4
source

If you are on Mac OS X and with IntelliJ IDEA 14, this will be stored here:

 ~/Library/Caches/IntelliJIdea14/userHistory/*.xml 

I suspect that OS X updates sometimes clear ~/Library/Caches because after updating OS X 10.10.2 I lost the history of the database console. If the contents of your database console are important to you, make sure that you back up this folder and do not exclude it in a Time Machine backup!

Update (2016/09/23): at some point, they pulled it out of the cache and into the settings folder, which is good because you no longer have to worry about macOS updates destroying it. For example, it is here in the current version:

 ~/Library/Preferences/IntelliJIdea2016.2/consoles/db/ 
+2
source

Mac versions store it at:

 ~/Library/Preferences/IDEA version/consoles/db/ 
+1
source

Source: https://habr.com/ru/post/1502332/


All Articles