Skip to content

Commit

Permalink
Merge pull request #111 from AmpersandHQ/add-db-schema-whitelistjson
Browse files Browse the repository at this point in the history
Add missing `db_schema_whitelist.json`
  • Loading branch information
convenient authored Apr 28, 2023
2 parents 66aedb3 + 526698d commit bdb5cb2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ install:
- composer install --no-interaction
- PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --dry-run --rules=@PSR2 --diff src/
- vendor/bin/phpcs -s --standard=./ruleset.xml src/
- chmod 606 src/etc/db_schema_whitelist.json # so that docker container can write via volume
- TEST_GROUP=$TEST_GROUP composer docker-install-magento
- fileschanged=$(git ls-files -m -d | wc -l); if [[ ! "$fileschanged" -eq "0" ]]; then echo "Do you need to update the db_schema_whitelist.json file?" && git status && git --no-pager diff && sleep 5 && exit 1; fi

script:
- composer docker-configure-magento
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
},
"scripts": {
"docker-install-magento": [
"CURRENT_EXTENSION=\".\" FULL_INSTALL=1 COMPOSER_REQUIRE_EXTRA='tddwizard/magento2-fixtures' TWOFACTOR_ENABLED=1 UNIT_TESTS_PATH='dev/MagentoTests/Unit' INTEGRATION_TESTS_PATH='dev/MagentoTests/Integration' vendor/bin/mtest-make $TEST_GROUP"
"CURRENT_EXTENSION=\".\" FULL_INSTALL=1 COMPOSER_REQUIRE_EXTRA='tddwizard/magento2-fixtures' TWOFACTOR_ENABLED=1 UNIT_TESTS_PATH='dev/MagentoTests/Unit' INTEGRATION_TESTS_PATH='dev/MagentoTests/Integration' vendor/bin/mtest-make $TEST_GROUP",
"vendor/bin/mtest 'php bin/magento setup:db-declaration:generate-whitelist --module-name=Ampersand_DisableStockReservation'"
],
"docker-configure-magento": [
"vendor/bin/mtest 'vendor/bin/n98-magerun2 config:store:set checkout/options/guest_checkout 1'",
Expand Down
13 changes: 13 additions & 0 deletions src/etc/db_schema_whitelist.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"order_sources": {
"column": {
"extension_id": true,
"order_id": true,
"sources": true
},
"constraint": {
"PRIMARY": true,
"ORDER_SOURCES_ORDER_ID_SALES_ORDER_ENTITY_ID": true
}
}
}

0 comments on commit bdb5cb2

Please sign in to comment.