5

I am using intllij and every now and then I have to setup a new project which uses the same or similar datasources to a previous project.

Is there a simple way to copy them across?

BevynQ
  • 8,089
  • 4
  • 25
  • 37

2 Answers2

9

Under the datasource properties there is a scope in the top right corner.

Change it from PROJECT to IDE

Looks like the interface has changed there is now this button to use it will move the data source from Project Data Sources to Global Data Sources. Using it on a Global Data Source will move it to Project Data Sources

enter image description here

more information at jetbrains

BevynQ
  • 8,089
  • 4
  • 25
  • 37
  • 2
    Looks like the UI for this has changed. In 2016.2.2 its now a "Make Global" button in datasource properties that seems to do the same thing. – Michael Haefele Sep 15 '16 at 16:52
2

You can either move a data source to a shared, global data source, or you can copy them as a separate data source (added somewhere in 2017). The first option will keep the consoles etc. shared, the second one will not.

To copy a data source, go to the context menuDatabase ToolsCopy Data Source to Clipboard. Then in the other project go the context menuNewImport from Clipboard.

Jan Fabry
  • 7,221
  • 2
  • 36
  • 41