PHPStorm and Datagrip

Hello,

I am currently working with a company that has a collection of 10 or so separate databases which are used in various combinations throughout a number of PHP projects. I find using Datagrip best for managing the databases collectively, but when I then use PHPStorm to handle the PHP projects, I find I have to enter the datasource config again for the system to acknowledge any database queries correctly.

Is there a way to use Datagrip sources directly within PHPStorm? For one thing, I don't want to have to change the config details in several projects when the changes occur.

Thanks

Andy

5 comments
Comment actions Permalink

Hello,

Yes, you can copy the dataSources.* files from DataGrip configuration folder - https://intellij-support.jetbrains.com/hc/en-us/articles/206544519 - /config/projects/default/.idea to the .idea folder located inside your PhpStorm project directory.

By the way, all DataGrip functionality is included into PhpStorm.

1
Comment actions Permalink

There is no any automatic way to do this for example using same Project Name?

For instance Im using way more than 10 databases, and each project is connecting multiple databases, but not each of them.

Of corse I can make a script which will do it, but it would be nice if the IDE handling this stuff.

0
Comment actions Permalink
There is no any automatic way to do this for example using same Project Name?

No, there isn't. You can post it as a feature request in IDEA, but I think it won't get many votes as it's quite a rare scenario - people usually use an IDEA product OR DataGrip, as both of them cost some money.

https://youtrack.jetbrains.com/newIssue?project=IDEA&c=Type+Feature&c=Subsystem+Database

0
Comment actions Permalink

Thanks for the tip Vladimir.

For anyone else, I had color settings for each of my connections, found them in my datagrip workspace.xml and copied them to workspace.xml in my project .idea folder

<component name="DatabaseLocalColorSettings">
<colors>
<entry key="some-key" value="Green" />
</colors>
</component>

I don't think that there was an issue with the entry key, when restarted PHPStorm everything looked ok.

0
Comment actions Permalink

I have same issue here. I use DataGrip to manage databases, and the PHPStorm for the development. And every time I rebuild the project I need to configure data sources in both DataGrip and PHPStorm. It's a bit annoying. But regardless of using many databases or only one, the most annoying part is that whenever a change is made in the database structure I need to manually synchronize DataGrip and PHPStorm data sources. This is annoying because often I synchronize DataGrip but forget PHPStorm, and then I either start getting incorrect warning messages or the IntelliSense stops working for query autocompletion.

This feature would be very nice, and I would appreciate it a lot. It’s a pity hear it would never be implemented.

To be honest, in general, I think JetBrains has a lot of awesome tools and DataGrip has a big potential to be another, but it seems like it is not given the value it worth.

0

Please sign in to leave a comment.