Data source folder permanently broken after adding "/" to the name Follow
Edit: Ignore everything here, I got it fixed and my use case is based on a misunderstanding.
Hello, I was trying to group data sources in subfolders by moving the data source to a folder with a "/" in the name. This did not end well, and IntelliJ hates me for it. I tried deleting /.idea/dataSources.local.xml, /.idea/dataSources.xml and the /.idea/dataSources/ folder, but the problem persists.
The data source in question was in a folder "Development". I tried to rename it to "Development/<product name>", but then the data source disappeared from the list in the Database tool window. Then I went into dataSources.xml and changed <data-source group="Development/<product name>" back to group="Development", but it won't show. Renaming it something totally different works perfectly. I would really like the folder to be called "Development" though! How can I get this working again? Is there some file I missed? I just can't see how IntelliJ remembers the butchered folder name when I deleted everything related to it (I'm pretty sure).
If you want to try it out, create a data source (MariaDB in my case), right click it in the Database tool window list, click "Move to folder", and enter some random name "asdf". Now move it to "asdf/abcd", it will disappear. Go to /.idea/dataSources.xml and remove the group attribute from the data source. It should pop back into the Database tool window list. Now move the data source to folder "asdf", and you will see that the data source disappears again. The folder "asdf" has been permanently broken.
Has anyone else experienced this? How can I fix it? I want "Development" back! :(
Please sign in to leave a comment.
Okay, I don't know exactly what I did right here, but in /.idea/dataSources.xml I removed the <working-dir> tag from each data source and changed group to the desired groups and saved the file, and then right clicked the data sources in IntelliJ and gave them the same name as the "group" attribute in /.idea/dataSources.xml, and now I can finally see the data sources under "Development" and "Production" like before.
I didn't realize that the database list was project specific, so my use case isn't really valid anyway, so just ignore everything about wanting to group in subfolders. I will not need it the way the data source list is specific for each project, I thought it was common for all projects.
Sorry for wasting everyone's time!
Any other questions, just let us know.