Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DATA_MODEL] rename commande_fournisseur_dispatch into receptiondet_batch #27528

Merged
merged 11 commits into from
Mar 17, 2024

Conversation

altairis-tof
Copy link
Contributor

follow #26021

@altairis-tof altairis-tof changed the title NEW : rename commande_fournisseur_dispatch into receptiondet_batch WIP - NEW : rename commande_fournisseur_dispatch into receptiondet_batch Jan 15, 2024
@altairis-tof altairis-tof changed the title WIP - NEW : rename commande_fournisseur_dispatch into receptiondet_batch NEW : rename commande_fournisseur_dispatch into receptiondet_batch Jan 15, 2024
@altairis-tof altairis-tof changed the title NEW : rename commande_fournisseur_dispatch into receptiondet_batch [DATA_MODEL] rename commande_fournisseur_dispatch into receptiondet_batch Jan 19, 2024
Copy link
Member

@lmag lmag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@altairis-tof
Copy link
Contributor Author

altairis-tof commented Jan 19, 2024

next steps will be the renaming of the CommandeFournisseurDispatch class and then the renaming of fk_commande and fk_commandefourndet fields

@fappels
Copy link
Contributor

fappels commented Jan 19, 2024

Does this mean classic dispatch without reception object will get deprecated?

@altairis-tof
Copy link
Contributor Author

Hello @fappels , i dont think so; the classic dispatch will still work.

ALTER TABLE llx_product DROP COLUMN onportal;
ALTER TABLE llx_product DROP COLUMN onportal;

RENAME TABLE llx_commande_fournisseur_dispatch_extrafields TO llx_receptiondet_batch_extrafields;
Copy link
Member

@eldy eldy Jan 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. Renaming this table will reduce confusion in how and for what this table is used. It is also a big

To rename a table, you must use "ALTER TABLE ... RENAME ..." (se example at top of the file).

also you must update the trigger used for pgslq:

-- VPGSL8.2 CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_receptiondet_batch FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();

Copy link
Contributor Author

@altairis-tof altairis-tof Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello @eldy it seems that RENAME TABLE is also good (https://dev.mysql.com/doc/refman/8.0/en/rename-table.html and https://popsql.com/learn-sql/mysql/how-to-rename-a-table-in-mysql) but maybe you have a good reason to not use it ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trigger updated here if i understood what you said : 933a36c

Copy link
Contributor Author

@altairis-tof altairis-tof Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i also changed the way to rename table c2345a4

@eldy eldy added the PR to fix - See feedback in comments PR needs to be fixed to be integrated (some comments should describes the fix to do) label Jan 22, 2024
@altairis-tof
Copy link
Contributor Author

altairis-tof commented Feb 1, 2024

@eldy fixes done and conflicts solved; i am eager to see this one merged and work on the next PR ;-)

@lmag lmag requested a review from eldy February 3, 2024 18:28
Copy link
Member

@lmag lmag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@altairis-tof
Copy link
Contributor Author

Hello @eldy i really need this PR to be merged before creating ReceptionDetBatch class and modify CommandeFournisseurDispatch to inherit from the new one. I will have too many conflicts otherwise.
(@lmag @FHenry )

@lmag
Copy link
Member

lmag commented Feb 18, 2024

@eldy it's ok for you ?

@lmag lmag added PR OK to merge PR was analyzed by PR merger and seems ok to be validated. Merge may occurs soon... and removed PR to fix - See feedback in comments PR needs to be fixed to be integrated (some comments should describes the fix to do) labels Mar 1, 2024
@lmag lmag assigned eldy Mar 1, 2024
@lmag lmag requested a review from FHenry March 15, 2024 10:28
@@ -159,6 +159,7 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_propal FOR EACH ROW
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_propal_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_propal_merge_pdf_product FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_propaldet_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_receptiondet_batch FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No needed because duplicate of line 92

Copy link
Member

@FHenry FHenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@altairis-tof There is duplicate create PGSql method in function.sql

@eldy eldy merged commit ebba438 into Dolibarr:develop Mar 17, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR OK to merge PR was analyzed by PR merger and seems ok to be validated. Merge may occurs soon...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants