Ddev: Implement support for datagrip similar to sequelpro support

Created on 23 Jan 2019  路  6Comments  路  Source: drud/ddev

Is your feature request related to a problem? Please describe.

Datagrip is an application, which has a similar functionality like sequelpro.
Sadly sequelpro is getting more and more instable, so we need an alternative:

Describe the solution you'd like

  • Implement the same functionality like ddev sequelpro for ddev datagrip for passing the database DSN and credentials, either via FILE or via ENV Vars or ARGUMENT
  • Should either launch datagrip with setup or phpstorm with the same file (datagrip can be integrated as plugin)
  • makes development easier.

Describe alternatives you've considered

  • manuall datagrip setup

Additional context

Most helpful comment

jetbrains reacted with a new ticket:

All 6 comments

The fantastic thing about datagrip is that it's multiplatform, unlike sequelpro.
The bad thing is it's really pricey.

I wonder if we could use stable port number for accessing mysql or something like it as a general technique, and then somehow use global config to determine what tool gets run.

https://twitter.com/datagrip/status/1088006341120139264

@kaystrobach @jetbrains Can we ask you to describe the use case? How are you going to use this feature?

jetbrains reacted with a new ticket:

just spend some time to understand datagrip connection handling:

There is a file called .idea/dataSources.xml

If you would simply update that file with ddev the connection would be accessable from phpstorm and from datagrip - this works atleast if you first start ddev and then phpstorm

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
    <data-source source="LOCAL" name="ddev - connection name" uuid="d0c53247-ec9f-44c8-9f4c-ea8f03b67892">
      <driver-ref>mysql.8</driver-ref>
      <synchronize>true</synchronize>
      <jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
      <jdbc-url>jdbc:mysql://127.0.0.1:32768/db</jdbc-url>
      <driver-properties>
        <property name="autoReconnect" value="true" />
        <property name="zeroDateTimeBehavior" value="CONVERT_TO_NULL" />
        <property name="tinyInt1isBit" value="false" />
        <property name="characterEncoding" value="utf8" />
        <property name="characterSetResults" value="utf8" />
        <property name="yearIsDateType" value="false" />
      </driver-properties>
    </data-source>
  </component>
</project>

but it seems to not work always ... so it still needs some investigation

This is super easy to do now with custom commands, so there's an example for mysqlworkbench in every ddev project (.ddev/commands/host/mysqlworkbench.example). Contributions are welcome for other tools (probably https://github.com/drud/ddev-contrib is the best place). Closing this for now as I think community-contributed commands are the path forward for things like this.

Was this page helpful?
0 / 5 - 0 ratings