modifyng mshop_product table with new coloumn

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
mahammadareef
Posts: 54
Joined: 14 Oct 2022, 11:54

modifyng mshop_product table with new coloumn

Post by mahammadareef » 01 Feb 2023, 07:23

want to customize the mshop_product table and add a new column called identifier ...
and want to store a unique identifier when the product gets created ...how i can do this .. explain to me in steps

condition: add after code column

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: modifyng mshop_product table with new coloumn

Post by aimeos » 02 Feb 2023, 13:32

The product code is exactly tailored for that.

If you want to add a new column nevertheless, implement a decorator for the manager:
https://aimeos.org/docs/latest/models/extend-managers/
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
mahammadareef
Posts: 54
Joined: 14 Oct 2022, 11:54

Re: modifyng mshop_product table with new coloumn

Post by mahammadareef » 03 Feb 2023, 15:45

Thank you for help .....
extending manager is okay but I want to know...

how to add an identifier (column) after code (column) in mshop_product ( table )

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: modifyng mshop_product table with new coloumn

Post by aimeos » 05 Feb 2023, 16:26

The used Upscheme library supports modifiers but no after() because only MySQL is offering that and column order isn't important.

The list of available column modifiers offered by Upscheme:
https://upscheme.org/#column-modifiers
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
mahammadareef
Posts: 54
Joined: 14 Oct 2022, 11:54

Re: modifyng mshop_product table with new coloumn

Post by mahammadareef » 06 Feb 2023, 05:24

can we alter the mshop_product table by using laravel default migrations ?

User avatar
aimeos
Administrator
Posts: 7858
Joined: 01 Jan 1970, 00:00

Re: modifyng mshop_product table with new coloumn

Post by aimeos » 07 Feb 2023, 08:17

Yes, you can but it may create confusion where the additional column is created.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply