Sharing databases between projects within Intellij

后端 未结 6 2194
死守一世寂寞
死守一世寂寞 2021-02-03 18:47

I use Intellij to inspect databases, run sql, view data in tables etc. This all works fine but the only thing I am missing is the ability to define these datasources once and vi

相关标签:
6条回答
  • 2021-02-03 18:58

    So how I did it on 2018.3 was to go to the Database tool window then right click on your datasource you want to copy then Database Tools -> Copy Datasource to Clipboard. In the Database window for the project you want to copy to click the + at the top left and it has an option to Import from Clipboard.

    0 讨论(0)
  • 2021-02-03 19:04

    Go to the Database tool window and click on the Data Source Properties button. Select the data source you want to make global. Click on the Make Global button in the tool bar above.

    The Make Global button looks like this:

    Make global button

    Now you can use the data source from all your projects. However a global data source is not stored in the project files, so any other developers working on the same project will need to define their own data source.

    0 讨论(0)
  • 2021-02-03 19:06

    The Make Global button is no longer green (Intellij Ultimate 2018.02).

    It's located above the datasource list, as in the (crappy) screenshot.

    0 讨论(0)
  • 2021-02-03 19:16

    In IntelliJ 2019.3 to share connection to DB with multiple projects:

    . Open Database panel . Data source Properties . Click the blueMake Global button

    View this image to see where it is

    0 讨论(0)
  • 2021-02-03 19:19

    In IntelliJ 2019.1, 2019.2 to share connection to DB with multiple projects:

    1. Open Database panel
    2. Datasource Properties
    3. Make Global
    0 讨论(0)
  • 2021-02-03 19:23

    In Intellij 2020.1, click on the Database view, then click on "Data Source Properties" (database with wrench icon). On the dialog that opens, click on "Make global", which is the 5th icon (screenshot below).

    screenshot

    0 讨论(0)
提交回复
热议问题