[SOLVED] Adding new column to mshop_order

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!
krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

[SOLVED] Adding new column to mshop_order

Post by krzysiekp » 16 May 2022, 11:47

I have added a new column to mshop_order. How to write a task that will install this ?
My schema file in custom extension packages\new-ext\lib\custom\setup\default\schema\order.php

Code: Select all

return array(
	'table' => array(
		'mshop_order' => function(\Doctrine\DBAL\Schema\Schema $schema ) {

			$table = $schema->getTable( 'mshop_order' );
			$table->addColumn( 'newcolumn', 'integer', ['length' => 11, 'default' => 0] );

			return $schema;
		}
	),
);
I added this new column some time ago and only now when I wanted to add new shop via the command:

php artisan aimeos: setup new_shop template1

I noticed that my manually added column was removed by Aimeos.
Last edited by krzysiekp on 17 May 2022, 08:43, edited 1 time in total.

krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Re: Adding new column to mshop_order

Post by krzysiekp » 16 May 2022, 18:18

@Aimeos

How to make the columns that were manually added to the mshop_order table not removed during php artisan aimeos: setup ?


Post Reply