e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
321 stars 213 forks source link

installation to existing database #4562

Closed Jimmi08 closed 1 year ago

Jimmi08 commented 2 years ago

Question

Why - when installing e107 to the existing database - do you drop all tables and not only e107 tables?

if($this->dbqry('DROP DATABASE'.$this->previous_steps['mysql']['db'].''))

Just from curiosity. I am aware of this and there is the message that data will be deleted, so no problem, but I never met something like this with other CMS. Normally there is a list of tables and those tables are deleted.

What I am doing now: Back up the existing database, export it, install e107 and then import the original database back.

Am I right that if you would delete only tables with the set prefix, it would still delete tables with these settings: Original DB: e107_wpx_ New E107 DB: e107_

Thanks for your time

Deltik commented 2 years ago

According to the Git history, that DROP DATABASE was added in an attempt to fix https://github.com/e107inc/e107/issues/676.

I agree with you that it is not a nice solution, so perhaps we should turn this question into a feature request to make the installer not delete the database.

Jimmi08 commented 1 year ago

https://github.com/e107inc/e107/discussions/4989

Jimmi08 commented 1 year ago

It is working correctly now. If you check Create database, old database is created. If you left this unchecked. you get warning about database exists but foreign tables are left untouched.