webERP Forum
Table deliverynotes is orphaned? - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Development Discussion & Specification (http://www.weberp.org/forum/forumdisplay.php?fid=10)
+--- Thread: Table deliverynotes is orphaned? (/showthread.php?tid=8989)

Pages: 1 2


Table deliverynotes is orphaned? - TurboPT - 12-16-2021

I've not yet been able to fully dig into when the deliverynotes table became orphaned, but there are no longer any code references to the table. I noted this table missing before the 4.15.2 release when pre-testing clean installs.

This repository search only finds references in the sql/mysql/ path, from when the table was first created back in v3.11, and other version updates since then, but nowhere else.

So, what should we do?
  1. Restore the table and related references?
  2. Add a drop table with the next release? (or make a release note so that users can do it themselves? ... so that we don't cause any data loss)
  3. Something else???
Anyway, if anyone may already have some historical knowledge relative to this table, please add a comment, whether good or bad, so that we can determine the best resolve.


RE: Table deliverynotes is orphaned? - TimSchofield - 12-16-2021

I have done a thourough search of the history, and I can't find that table ever being used in the code. It was created but never used. So unless anybody knows different I would suggest dropping the table.

The only proviso would be if somebody has written custom code that uses that table, but I think in this case the onus is on them to ensure updates don't affect their custom code.

Thanks
Tim


RE: Table deliverynotes is orphaned? - TurboPT - 12-16-2021

Ok then, in the next day or two, I'll start a new migrate SQL file for the next version with the table drop.

Obviously, the drop can be removed should any other insights about this table come forward.


RE: Table deliverynotes is orphaned? - TimSchofield - 12-19-2021

Paul, rather than start a new SQL file, I would rather if we can agree on it, we move to the new DB upgrade system I have outlined here:

https://github.com/timschofield/webERP-svn/wiki/DBUpgrade

I have written the code for it, you can find it here:

https://github.com/timschofield/webERP-svn/tree/DBUpdate

Once it's tested, it would just be a matter of sending a pull request to your repository.

Tim


RE: Table deliverynotes is orphaned? - TurboPT - 12-19-2021

Oh, ok, I'll have to check that out. I was about to add a link for the new file commit.

No problem reverting what I've created.


RE: Table deliverynotes is orphaned? - TurboPT - 12-25-2021

Tim, I've created a pull request that reverts that SQL file. (and related changelog entry)


RE: Table deliverynotes is orphaned? - TimSchofield - 12-25-2021

Thanks Paul, If you are OK with my new DB upgrade system, can I suggest you create a v5.0 branch, and then I can send a pull request?

Tim


RE: Table deliverynotes is orphaned? - TurboPT - 12-25-2021

Yes, the DB update looks good to me. I have created branch weberp_version5.

The only tangent question I have ... would we like to see those 4 UpgradeDB* files moved into class/OO form at some point? I don't mind tackling at a later time, if so.

After I pull later, I'll give it a trial run for my own curiosity and interest.


RE: Table deliverynotes is orphaned? - TimSchofield - 12-25-2021

Thanks Paul. I have no problem moving those files there.

I will do the pull request on Sunday - not sure my wife will want me going this stuff on Christmas day ?


RE: Table deliverynotes is orphaned? - TurboPT - 12-25-2021

Mine either, very likely ... it can wait until next week if needed, enjoy the holiday weekend! Smile