goFrendiAsgard / No-CMS

No-CMS, A CodeIgniter Based CMS Framework
299 stars 199 forks source link

When A module need modification, how to keep the old data? #147

Closed witwall closed 8 years ago

witwall commented 8 years ago

for example, I want to add a new table, I can directly modify the project, then re-generate the module, then re-active the module, right?

I tried in this way, the old table will lost everything.

If possible the system automatically rename the old table to another name, and can import the old data to new table?

Of course, as a programmer, I can rename the table manually, but it is really difficult for an end-user.

goFrendiAsgard commented 8 years ago

You can modify modules/example/controllers/Info.php and add new columns there. Then you need to modify the module version in modules/example/description.txt. No-CMS will automatically check this, and update the columns as necessary.