Where does IntelliJ IDEA store database console scripts? - intellij-idea

I couldn't find answer to this questions on SO despite long search. For some reason I thought I've seen it before.
Do you guys know in which file IDEA saves content of database console scripts ?
I thought it was in dataSources.ids but I don't see scripts there, only connection settings.

Try looking into the IntelliJ cache folder.
For me I did not find the database scripts themselves, but found a history of all the sql statements executed here :
`c:\Users\$user\.IntelliJIdea13\system\userHistory\*.xml`
(Am on IntelliJ Idea EAP).

On newer version of IntelliJ (2020+) for Mac it can be found here:
~/Library/Application Support/JetBrains/IntelliJIdeaYOUR_VERSION/consoles/db

If you are on Mac OS X, and as of IntelliJ IDEA 14, this gets stored here:
~/Library/Caches/IntelliJIdea14/userHistory/*.xml
I suspect that OS X updates sometimes clear ~/Library/Caches, because after the OS X 10.10.2 update I lost my database console history. If the contents of your database console are important to you, make sure you are backing up this folder and not excluding it in your Time Machine backup!
Update (2016/09/23): At some point they moved it out of Caches and into the preferences folder, which is good because you no longer have to worry about macOS updates wiping it out. For example, it is here in the current version:
~/Library/Preferences/IntelliJIdea2016.2/consoles/db/

Mac versions store it at :
~/Library/Preferences/IDEA version/consoles/db/

Adding Ubuntu default to the list of answers, ofc you change IntelliJIdea2020.1 with your version.
~/.config/JetBrains/IntelliJIdea2020.1/consoles

Related

Oracle SQL Developer Export Issue: Target not writable

I have SQL Developer on machine. Once while exporting data from database to my local drive, It prompted me to ask whether " you would like to allow the local drive to be writable or not". I accidentally clicked No. From then, I am not able to export any file from database to my local drive. Every time I get an error saying "Save as Target :D is not writable". I couldnt find any solution in the preferences section nor over the internet. I am accessing SQL developer via citrix. I have cleared cache, removed tmp files. Nothing helped. Is anybody facing the same issue? Any idea how to clear defaults? I use Windows 7 environment.
Even I faced this issue and googled but no luck. So, I started trying multiple options. Below one worked (exclude the double quotes as slash is lost while posting this update)
\\Client\C$\Test.txt
Example : \\Client\C$\Data\Test.txt

Get back lost shelf changes

I have shelved my 26 java files changes via Intellij Idea 2016.2.1 and I checkout to different branch.
When I came to old branch to check my shelved changes.
I gone a mad now, I lost all the files. I was worked nearly two months
Can somebody help to get it back?
You can restore the state of those files if they were edited in IntelliJ. Use local history to see all the changes made in IntelliJ (VCS -> Local History -> Show History).
Even there isn't Shelf tab in IDE you can find shelved changes as patch files at {ProjectName}/.idea/.idea.{ProjectName}/shelf/.idea/shelf.
Then your can apply any selected patch.
I was able to view lost changes and revert back to them by:
right click on project directory, select Local History > Show History
Find the entry in the history menu that you want to restore. You can examine the files by double clicking on the entry and the files to examine differences.
Right click on the entry you want to restore, and select Revert
Note in my case Git>VCS Operations>Show History showed nothing. Only through the Project Files menu.
Andrei's answer was helpful for my situation where I renamed my project and my previously shelved changes were no longer found under the shelf, but I did run into an issue when applying the patch file because I was prompted to "Select missing base" for various files in the patch. Similar to what is seen in the screenshot below:
https://youtrack.jetbrains.com/issue/IDEA-183910
I was able to avoid having to "Select missing base" for various files by first changing the default shelf location and then applying the patch.
https://www.jetbrains.com/help/idea/shelving-and-unshelving-changes.html#change-shelve-location
Also, I found my patch in this location:
{ProjectName}/.idea/shelf
instead of the aforementioned location:
{ProjectName}/.idea/.idea.{ProjectName}/shelf/.idea/shelf
Maybe this will help someone:
I lost part of my shelved changes in combination with an update of IntelliJ. I'm not sure if the update was the reason but eventually most of my most recent (and important) changes were gone.
I couldn't restore them from local history as this does not "survive" an update of IDEA. But in the files I saw that there still is some data:
C:\Users\myUser\AppData\Local\JetBrains\IntelliJIdea2021.2\LocalHistory had a changes.storageData with ~50MB.
Copying the files to the folder of the new version didn't help as the files got overwritten again.
Solution:
I was able to get the old version of IntelliJ (2021.2) here and installed it. This can be done in parallel, without removing the newer version.
Here I was able to retrieve my changes from the Local History and shelve or apply them again.
Hint: Backup the "Local History" folder (or the whole IntelliJIdea20xx.x folder) before you start. I don't remember if I had to copy it in there again or if it worked out of the box. (Just to be sure the local history doesn't get lost).
I've also experienced this bug repeatedly and hence no longer use shelved changes, but rather the Git CLI directly. As of 2022 Jetbrains IDE's still cannot be trusted with their "Smart Checkout" feature, which has a small probability of the total loss of your files (experienced personally in both IntelliJ & Rider).
Unlike another comment here regarding using the Local History, this did not work for me as the history showed nothing. I've also lost many hours of work due to this bug which remains unfixed.
The solution is to use "git stash -u" on the command line, then checkout the desired commit. Once youre done, type "git stash apply" to restore your files. Trusting the "smart checkout" feature is like playing Russian roullette. It's IDE magic that may just fail and you lose everything.

Chrome OS bug - file select dialog (for uploads) 'stuck'

The best way to sum up the issue would be with a screenshot, but unfortunately my screenshots auto-save to downloads and so I can't upload them. What's happening is that when I enter the 'file select' dialog in trying to upload a file, it's automatically in the 'drive' folder and won't move to any other folder. I've tried restarting and resetting my machine, tried the upload process on a bunch of different platforms, tried using the other user account on my machine, tried updating my software, but none of these have made any difference. I can get into my downloads folder and open files from it fine outside of this context, and I can workaround by using the drag-and-drop to upload on platforms which have this feature, but otherwise I'm stuck.
I've googled extensively to see if anyone else is having this issue and have found this thread: https://productforums.google.com/forum/#!topic/chromebook-central/d7g9EEDsr8w but there's no helpful solution there (recommended a powerwash but the asker has already done this several times). I've also tried to find a solution with the help of my (programmer) employer, but no luck so he recommended asking here. It seems like it wouldn't be a hardware issue when I can still access the folder outside of this specific function, but if it were a problem with the running system it seems it would be happening across the board and therefore show up more in a google? If anyone has any suggestions I'd be very grateful as it's getting quite tiresome having to drag and drop things into Facebook messages to get them uploaded! The machine is less than a year old so if I can't find any solution I'll see about getting it replaced under warranty. Thanks in advance for any help, and please let me know if there's any key info I've left out!
Machine: Samsung Chromebook XE303C12
OS: Version 38.0.2125.110

Updating an iPad App with a Completely Different Architecture

I've been updating my iPad app very steadily now and the process has been fine. But in a month or so, I'm going to be upgrading it to a version that has a completely different architecture.
Both versions will be using the cache and db in very different ways to store the data it's pulling from a server.
Question: Will the Apple update process automatically delete all local data from my previous version upon installing the new version? Or, do I have to code this functionality in somewhere in my new version?
Example: Some files you download on Windows don't remove the data from "Application Data" or "Local Settings" upon uninstalling. I fear that this same scenario will happen on my iPad when upgrading my app to a completely new version. Is this the case?
Thanks,
Derek
No, the update process does not delete files that you have in the app's documents folder. They will still be there.
iPhone and iPad updates do not remove data from previous version installations of an app. Your app will have to detect (say, look for the current version number) the old databases, and either delete them, or perhaps better for the user, update them to the new format.
Make sure to somehow tag the new data format with a version number so your app can detect it, and not delete it.

How to organize an automated changelog in Trac?

I would like to get an automated changelog from Trac, that will include references to tickets that made some important changes to the architecture/design of the code. My ideal scenario would look like this:
According to some ticket I make a change to SVN
I add some specific line to the ticket saying that this changeset created an important change to the code/wiki
I go to some dedicated Trac page and see a full list of such changes made with the project.
In other words, it's going to be a changelog, which is available for all project participants, and the entire team will be updated about the important changes with source code and wiki.
Can you suggest any Trac plugin for this? Or maybe Trac itself can do it?
ps. Would be excellent to have another "Plans Log", where everybody can post their plans on future changes. Again, inside tickets.
Have you tried the ChangeLogMacro on TrackHacks: http://trac-hacks.org/wiki/ChangeLogMacro
Sample:
[7280] by doki_pen on 12/18/09 20:27:15
Update body reference to output.
Since body isn't defined. Fixes #5538
[7191] by doki_pen on 11/26/09
02:18:32
watch user feature
fixes #3546
[7190] by doki_pen on 11/26/09
02:18:21
copy changes
trying to make things more intuitive
for users
Personally I'm looking for something a little more like the VirtualBox changelog which I can then put into a plain text file. So if anyone knows how to do this I'm interested!
www.virtualbox.org/wiki/Changelog
Sample:
VirtualBox 3.1.2 (released 2009-12-17)
This is a maintenance release. The following items were fixed and/or added:
VMM: fixed SMP stability regression
USB: fixed USB related host crashes on 64 bits Windows hosts (#5237)
Main: wrong default HWVirtExExclusive value for new VMs (bug #5664)
Main: DVD passthrough setting was lost (bug #5681)
VBoxManage: iSCSI disks do not support adding a comment (bug #4460)
VBoxManage: added missing --cpus and --memory options to OVF --import
VirtualBox 3.1.0 (released 2009-11-30)
This version is a major update. The following major new features were added:
* Teleportation (aka live migration); migrate a live VM session from one host to another (see the manual for more information)
* ...