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

Added a schema generator #10197

Merged
merged 5 commits into from Nov 8, 2018

Conversation

Projects
None yet
3 participants
@mickaelandrieu
Contributor

mickaelandrieu commented Aug 29, 2018

Questions Answers
Branch? develop
Description? Add in the project the tools used before to generate a database schema.
Type? new feature
Category? CO
BC breaks? no
Deprecations? no
How to test? Follow the instructions in the readme, using MySQL Workbench I was able to generate a schema like the one described here.

This change is Reviewable

@mickaelandrieu

This comment has been minimized.

Contributor

mickaelandrieu commented Aug 29, 2018

I create the pull request only because I think this script will be lost else :/

The only right way is to stop to remove the foreign keys during the installation: I believe this hack was introduced during 1.7.4.2 1.7.1.1, I'd like to know why and if this is something we can fix.

WDYT?

@mickaelandrieu mickaelandrieu changed the title from Tools/schema generator to Added a schema generator Aug 29, 2018

@Quetzacoalt91

This comment has been minimized.

Member

Quetzacoalt91 commented Sep 3, 2018

PrestaShop 1.7.1.1, a test exists about this in the 1-click upgrade module:

        if (version_compare($this->destinationPsVersion, '1.7.1.1', '>=')) {
            $schemaUpgrade = new \PrestaShopBundle\Service\Database\Upgrade();
            $outputCommand = 'prestashop:schema:update-without-foreign';
        } else {
            $schemaUpgrade = new \PrestaShopBundle\Service\Cache\Refresh();
            $outputCommand = 'doctrine:schema:update';
        }
@Quetzacoalt91

This comment has been minimized.

Member

Quetzacoalt91 commented Sep 4, 2018

I guess we should remove these files on releases. Can you please add the path to the ignored paths?

protected $patternsRemoveList = [
'tests$',
'tools/contrib$',
'travis\-scripts$',
'CONTRIBUTING\.md$',
'composer\.json$',
'diff\-hooks\.php',
'((?<!_dev\/)package\.json)$',
'(.*)?\.composer$',
'(.*)?\.git(.*)?$',
'.*\.map$',
'.*\.psd$',
'.*\.md$',
'.*\.rst$',
'.*phpunit(.*)?',
'(.*)?\.travis\.',
'.*\.DS_Store$',
'.*\.eslintrc$',
'.*\.editorconfig$',
'web/.*$',
'app/config/parameters\.yml$',
'app/config/parameters\.php$',
'config/settings\.inc\.php$',
'app/cache/..*$',
'\.t9n\.yml$',
'\.scrutinizer\.yml$',
'admin\-dev/(.*/)?webpack\.config\.js$',
'admin\-dev/(.*/)?package\.json$',
'admin\-dev/(.*/)?bower\.json$',
'admin\-dev/(.*/)?config\.rb$',
'admin\-dev/themes/default/sass$',
'admin\-dev/themes/new\-theme/js$',
'admin\-dev/themes/new\-theme/scss$',
'themes/_core$',
'themes/classic/_dev',
'themes/webpack\.config\.js$',
'themes/package\.json$',
'vendor\/[a-zA-Z0-0_-]+\/[a-zA-Z0-0_-]+\/[Tt]ests?$',
'vendor/tecnickcom/tcpdf/examples$',
'app/cache/..*$',
'.idea',
'tools/build$',
'.*node_modules.*',
];

@mickaelandrieu mickaelandrieu force-pushed the mickaelandrieu:tools/schema-generator branch from 78a1733 to 2542875 Oct 29, 2018

@mickaelandrieu

This comment has been minimized.

Contributor

mickaelandrieu commented Oct 29, 2018

@mickaelandrieu mickaelandrieu requested a review from Quetzacoalt91 Oct 29, 2018

@mickaelandrieu mickaelandrieu added this to the 1.7.6.0 milestone Oct 29, 2018

fixed README
Co-Authored-By: mickaelandrieu <mickael.andrieu@prestashop.com>

@Quetzacoalt91 Quetzacoalt91 merged commit b88d5ea into PrestaShop:develop Nov 8, 2018

1 of 2 checks passed

Codacy/PR Quality Review Not up to standards. This pull request quality could be better.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Quetzacoalt91

This comment has been minimized.

Member

Quetzacoalt91 commented Nov 8, 2018

Thank you @mickaelandrieu

@PierreRambaud PierreRambaud deleted the mickaelandrieu:tools/schema-generator branch Nov 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment