despensa-app / despensa-rest-api

Despensa-app es una aplicación que te permite gestionar los productos que compras de forma habitual.
https://despensa-app.nmarulo.dev/
MIT License
13 stars 27 forks source link

Update type in Product database #7

Closed nmarulo closed 1 month ago

nmarulo commented 2 months ago

[!IMPORTANT] Read issue #2 first

Change the type from Integer to Long on line 28 of the Product class.

This change will cause the application to no longer compile with maven, because you have to update all classes related to the Product entity ID field.

List of classes to be modified ![image](https://github.com/user-attachments/assets/10ddd4ea-ca97-4ff8-aea9-1ee41de55122)

Finally, in the SQL script schema.sql change the type to BIGINT on line 20 and line 97.

[!NOTE] The following script is a note to myself, so you can ignore it.

Script a ejecutar en la base de datos de demo ```sql ALTER TABLE products_has_shopping_list DROP FOREIGN KEY fk_products_has_shopping_list_products; ALTER TABLE products_has_shopping_list MODIFY product_id BIGINT; ALTER TABLE products MODIFY id BIGINT AUTO_INCREMENT; ALTER TABLE products_has_shopping_list ADD CONSTRAINT `fk_products_has_shopping_list_products` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION; ```
Sofiyan-coder commented 1 month ago

Hello @nmarulo,

I have thoroughly studied the project and developed the necessary skills to contribute with high-quality pull requests. Assigning me this issue would greatly benefit my career in open source, and I am eager to assist in any way I can. and want to work on this project now and in future!

nmarulo commented 1 month ago

@Sofiyan-coder It's all yours 👍

Sofiyan-coder commented 1 month ago

@nmarulo Update me if any changes are needed and please give feedback if you like my contribution!

nmarulo commented 1 month ago

As stated in issue #2

Each issue noted with hacktoberfest must be completed within a week and you can only do one per week, this is to give more participants a chance. ...

It's okay that you were not able to complete it, I appreciate your effort and interest.

JinnJarBurger commented 1 month ago

@nmarulo if possible could you assign the issue to me? Thanks!