Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

copy database setup from one project to another

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?

like image 497
BevynQ Avatar asked Jul 16 '13 02:07

BevynQ


2 Answers

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

like image 193
BevynQ Avatar answered Sep 28 '22 13:09

BevynQ


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.

like image 25
Jan Fabry Avatar answered Sep 28 '22 13:09

Jan Fabry