How to clone project

I have one project with multitenancy. Now I want same project without multitetancy.How can I clone same project and then remove multitenancy from cloned project (second part i will do).

For cloning, I copied folder and change the name of folder, then changed the module prefix, but project is still showing same…

cuba_clone

Also how to change root package name. (com.company. – com.st.)
What will be the best possible way to this issue.

regards

Umesh

Any suggestion, please

Hi,

The problem with copying code is that you have to keep the different versions in sync, which is quite hard when doing a lot of changes over time.

Instead you can use application components to get rid of the duplication.

Create an app component ‘app-without-mt’ which containd zhe code without multi tenancy. Then you create another app, ‘app-with-mt’ which uses the application component and also adds the multi tenancy app component and then you do the adjustments required for the app with multi tenancy.

Here is an older example of the usage of app components in your own app:

Bye

Hi Umesh,

if you really want to go with project clone and not using Mario’s solution, you should take a look in addition to your steps:

  • settings.gradle : ‘rootProject.name’ should be the new project name

Please also keep in your mind that with changing the project name also the db-scripts will
partial change their names - if you will reuse an existing database, you will face some trouble on update the database.

Regards,
Steven

Thanks @s-m-k, @mario

I was able to clone project and it was running, but facing problem in database scripts. Everytime i run the project or update db it shows error in all update script that update already exist in database. Creating new database or deleting scripts has no effect.

So, I decided to start from making new project from scratch.

Can you suggest best way (shared database or app-component) for my scenario.

I have to divide my present project in two separate project. ‘A’ and ‘B’ -
‘A’ - this will be updated by us and only will be visible to user as knowledge base or downloading our uploaded documents.User can subscribe records and they will be copied to ‘B’ database. User will have only read access to this.
‘B’ - Separate application will be installed for separate users. all user data will be here with security. ‘A’ will be visible here.

As the entries in ‘A’ are large, I want to use same database to all users. This database will be updated regularly by us.

In this case what would be best solution - app-component or shared database?

regards

Umesh