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

[Bug] Can not install at ubuntu & php 7.2 #249

Closed
bolechen opened this Issue Jan 8, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@bolechen
Copy link

bolechen commented Jan 8, 2019

Steps to reproduce

composer create-project php-censor/php-censor php-censor.local --keep-vcs
./bin/console php-censor:install -vvvcomposer create-project php-censor/php-censor php-censor.local --keep-vcs

Errors

Setting up your database...
In PdoAdapter.php line 167:

  [PDOException (HY000)]
  SQLSTATE[HY000]: General error: 1553 Cannot drop index 'project_id': needed in a foreign key constraint


Exception trace:
 () at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:167
 PDO->exec() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:167
 Phinx\Db\Adapter\PdoAdapter->execute() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Db/Util/AlterInstructions.php:126
 Phinx\Db\Util\AlterInstructions->execute() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:518
 Phinx\Db\Adapter\PdoAdapter->executeAlterSteps() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:877
 Phinx\Db\Adapter\PdoAdapter->executeActions() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php:477
 Phinx\Db\Adapter\AdapterWrapper->executeActions() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php:406
 Phinx\Db\Adapter\TimedOutputAdapter->executeActions() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Db/Plan/Plan.php:144
 Phinx\Db\Plan\Plan->Phinx\Db\Plan\{closure}() at /var/www/php-censor.local/vendor/cakephp/collection/CollectionTrait.php:51
 Cake\Collection\Collection->each() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Db/Plan/Plan.php:145
 Phinx\Db\Plan\Plan->execute() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Db/Table.php:717
 Phinx\Db\Table->executeActions() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Db/Table.php:624
 Phinx\Db\Table->update() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Db/Table.php:683
 Phinx\Db\Table->save() at /var/www/php-censor.local/src/Migrations/20171014173348_removed_project_id_from_build_meta.php:15
 RemovedProjectIdFromBuildMeta->up() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php:128
 Phinx\Migration\Manager\Environment->executeMigration() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php:387
 Phinx\Migration\Manager->executeMigration() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php:361
 Phinx\Migration\Manager->migrate() at /var/www/php-censor.local/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php:121
 Phinx\Console\Command\Migrate->execute() at /var/www/php-censor.local/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /var/www/php-censor.local/vendor/symfony/console/Application.php:953
 Symfony\Component\Console\Application->doRunCommand() at /var/www/php-censor.local/vendor/symfony/console/Application.php:248
 Symfony\Component\Console\Application->doRun() at /var/www/php-censor.local/vendor/symfony/console/Application.php:148
 Symfony\Component\Console\Application->run() at /var/www/php-censor.local/bin/console:11

php-censor-migrations:migrate [-c|--configuration CONFIGURATION] [-p|--parser PARSER] [-e|--environment ENVIRONMENT] [-t|--target TARGET] [-d|--date DATE] [-x|--dry-run] [--fake]


using migration paths - /var/www/php-censor.local/src/Migrationswarning no environment specified, defaulting to: php-censorusing adapter mysqlusing database php-censorMigration file    /var/www/php-censor.local/src/Migrations/20140513143726_initial_migration.php    /var/www/php-censor.local/src/Migrations/20140513153133_change_build_keys_migration.php    /var/www/php-censor.local/src/Migrations/20140611170618_choose_branch.php    /var/www/php-censor.local/src/Migrations/20140730143702_fix_database_columns.php    /var/www/php-censor.local/src/Migrations/20150131075425_archive_project.php    /var/www/php-censor.local/src/Migrations/20150203105015_fix_column_types.php    /var/www/php-censor.local/src/Migrations/20150308074509_add_user_providers.php    /var/www/php-censor.local/src/Migrations/20150324174958_unique_email_and_name_user_fields.php    /var/www/php-censor.local/src/Migrations/20151008140800_add_project_groups.php    /var/www/php-censor.local/src/Migrations/20151009100610_remove_unique_name_index.php    /var/www/php-censor.local/src/Migrations/20151014091859_errors_table.php    /var/www/php-censor.local/src/Migrations/20151015124825_convert_errors.php    /var/www/php-censor.local/src/Migrations/20160425162114_branch_column_length.php    /var/www/php-censor.local/src/Migrations/20160623100223_project_table_defaults.php    /var/www/php-censor.local/src/Migrations/20170103163312_added_language_and_per_page_for_user.php    /var/www/php-censor.local/src/Migrations/20170218175400_fixed_build_error_message_column.php    /var/www/php-censor.local/src/Migrations/20170223113127_fixed_build_log_column_for_mysql.php    /var/www/php-censor.local/src/Migrations/20170226132922_fixed_build_log_column_for_mysql2.php    /var/www/php-censor.local/src/Migrations/20170321131931_add_environment.php    /var/www/php-censor.local/src/Migrations/20170413131256_added_source_column_to_build_table.php    /var/www/php-censor.local/src/Migrations/20170416130610_fixed_environments.php    /var/www/php-censor.local/src/Migrations/20170420142131_added_tag_column_to_build_table.php    /var/www/php-censor.local/src/Migrations/20170711112805_fixed_build_meta_for_mysql.php    /var/www/php-censor.local/src/Migrations/20170828142020_added_remember_me_login.php    /var/www/php-censor.local/src/Migrations/20170913141438_added_default_branch_only.php    /var/www/php-censor.local/src/Migrations/20171014173348_removed_project_id_from_build_meta.php    /var/www/php-censor.local/src/Migrations/20171015123827_added_additional_columns.php    /var/www/php-censor.local/src/Migrations/20171016143000_added_additional_columns2.php    /var/www/php-censor.local/src/Migrations/20171019143346_added_additional_columns3.php    /var/www/php-censor.local/src/Migrations/20171209135004_added_new_label_for_errors.php    /var/www/php-censor.local/src/Migrations/20180223052715_added_request_branch_to_build.php    /var/www/php-censor.local/src/Migrations/20180228024622_renamed_build_types.php    /var/www/php-censor.local/src/Migrations/20180311165225_removed_last_commit_from_project.php    /var/www/php-censor.local/src/Migrations/20180414075057_added_overwrite_config_field_to_project.php    /var/www/php-censor.local/src/Migrations/20180911140934_build_error_hash_index.php    /var/www/php-censor.local/src/Migrations/20181117121313_fix_plugins_names.php    /var/www/php-censor.local/src/Migrations/20190104014318_add_build_errors_totals.phpValid migration file /var/www/php-censor.local/src/Migrations/20140513143726_initial_migration.php.Loading class InitialMigration from /var/www/php-censor.local/src/Migrations/20140513143726_initial_migration.php.Running InitialMigration.Valid migration file /var/www/php-censor.local/src/Migrations/20140513153133_change_build_keys_migration.php.Loading class ChangeBuildKeysMigration from /var/www/php-censor.local/src/Migrations/20140513153133_change_build_keys_migration.php.Running ChangeBuildKeysMigration.Valid migration file /var/www/php-censor.local/src/Migrations/20140611170618_choose_branch.php.Loading class ChooseBranch from /var/www/php-censor.local/src/Migrations/20140611170618_choose_branch.php.Running ChooseBranch.Valid migration file /var/www/php-censor.local/src/Migrations/20140730143702_fix_database_columns.php.Loading class FixDatabaseColumns from /var/www/php-censor.local/src/Migrations/20140730143702_fix_database_columns.php.Running FixDatabaseColumns.Valid migration file /var/www/php-censor.local/src/Migrations/20150131075425_archive_project.php.Loading class ArchiveProject from /var/www/php-censor.local/src/Migrations/20150131075425_archive_project.php.Running ArchiveProject.Valid migration file /var/www/php-censor.local/src/Migrations/20150203105015_fix_column_types.php.Loading class FixColumnTypes from /var/www/php-censor.local/src/Migrations/20150203105015_fix_column_types.php.Running FixColumnTypes.Valid migration file /var/www/php-censor.local/src/Migrations/20150308074509_add_user_providers.php.Loading class AddUserProviders from /var/www/php-censor.local/src/Migrations/20150308074509_add_user_providers.php.Running AddUserProviders.Valid migration file /var/www/php-censor.local/src/Migrations/20150324174958_unique_email_and_name_user_fields.php.Loading class UniqueEmailAndNameUserFields from /var/www/php-censor.local/src/Migrations/20150324174958_unique_email_and_name_user_fields.php.Running UniqueEmailAndNameUserFields.Valid migration file /var/www/php-censor.local/src/Migrations/20151008140800_add_project_groups.php.Loading class AddProjectGroups from /var/www/php-censor.local/src/Migrations/20151008140800_add_project_groups.php.Running AddProjectGroups.Valid migration file /var/www/php-censor.local/src/Migrations/20151009100610_remove_unique_name_index.php.Loading class RemoveUniqueNameIndex from /var/www/php-censor.local/src/Migrations/20151009100610_remove_unique_name_index.php.Running RemoveUniqueNameIndex.Valid migration file /var/www/php-censor.local/src/Migrations/20151014091859_errors_table.php.Loading class ErrorsTable from /var/www/php-censor.local/src/Migrations/20151014091859_errors_table.php.Running ErrorsTable.Valid migration file /var/www/php-censor.local/src/Migrations/20151015124825_convert_errors.php.Loading class ConvertErrors from /var/www/php-censor.local/src/Migrations/20151015124825_convert_errors.php.Running ConvertErrors.Valid migration file /var/www/php-censor.local/src/Migrations/20160425162114_branch_column_length.php.Loading class BranchColumnLength from /var/www/php-censor.local/src/Migrations/20160425162114_branch_column_length.php.Running BranchColumnLength.Valid migration file /var/www/php-censor.local/src/Migrations/20160623100223_project_table_defaults.php.Loading class ProjectTableDefaults from /var/www/php-censor.local/src/Migrations/20160623100223_project_table_defaults.php.Running ProjectTableDefaults.Valid migration file /var/www/php-censor.local/src/Migrations/20170103163312_added_language_and_per_page_for_user.php.Loading class AddedLanguageAndPerPageForUser from /var/www/php-censor.local/src/Migrations/20170103163312_added_language_and_per_page_for_user.php.Running AddedLanguageAndPerPageForUser.Valid migration file /var/www/php-censor.local/src/Migrations/20170218175400_fixed_build_error_message_column.php.Loading class FixedBuildErrorMessageColumn from /var/www/php-censor.local/src/Migrations/20170218175400_fixed_build_error_message_column.php.Running FixedBuildErrorMessageColumn.Valid migration file /var/www/php-censor.local/src/Migrations/20170223113127_fixed_build_log_column_for_mysql.php.Loading class FixedBuildLogColumnForMysql from /var/www/php-censor.local/src/Migrations/20170223113127_fixed_build_log_column_for_mysql.php.Running FixedBuildLogColumnForMysql.Valid migration file /var/www/php-censor.local/src/Migrations/20170226132922_fixed_build_log_column_for_mysql2.php.Loading class FixedBuildLogColumnForMysql2 from /var/www/php-censor.local/src/Migrations/20170226132922_fixed_build_log_column_for_mysql2.php.Running FixedBuildLogColumnForMysql2.Valid migration file /var/www/php-censor.local/src/Migrations/20170321131931_add_environment.php.Loading class AddEnvironment from /var/www/php-censor.local/src/Migrations/20170321131931_add_environment.php.Running AddEnvironment.Valid migration file /var/www/php-censor.local/src/Migrations/20170413131256_added_source_column_to_build_table.php.Loading class AddedSourceColumnToBuildTable from /var/www/php-censor.local/src/Migrations/20170413131256_added_source_column_to_build_table.php.Running AddedSourceColumnToBuildTable.Valid migration file /var/www/php-censor.local/src/Migrations/20170416130610_fixed_environments.php.Loading class FixedEnvironments from /var/www/php-censor.local/src/Migrations/20170416130610_fixed_environments.php.Running FixedEnvironments.Valid migration file /var/www/php-censor.local/src/Migrations/20170420142131_added_tag_column_to_build_table.php.Loading class AddedTagColumnToBuildTable from /var/www/php-censor.local/src/Migrations/20170420142131_added_tag_column_to_build_table.php.Running AddedTagColumnToBuildTable.Valid migration file /var/www/php-censor.local/src/Migrations/20170711112805_fixed_build_meta_for_mysql.php.Loading class FixedBuildMetaForMysql from /var/www/php-censor.local/src/Migrations/20170711112805_fixed_build_meta_for_mysql.php.Running FixedBuildMetaForMysql.Valid migration file /var/www/php-censor.local/src/Migrations/20170828142020_added_remember_me_login.php.Loading class AddedRememberMeLogin from /var/www/php-censor.local/src/Migrations/20170828142020_added_remember_me_login.php.Running AddedRememberMeLogin.Valid migration file /var/www/php-censor.local/src/Migrations/20170913141438_added_default_branch_only.php.Loading class AddedDefaultBranchOnly from /var/www/php-censor.local/src/Migrations/20170913141438_added_default_branch_only.php.Running AddedDefaultBranchOnly.Valid migration file /var/www/php-censor.local/src/Migrations/20171014173348_removed_project_id_from_build_meta.php.Loading class RemovedProjectIdFromBuildMeta from /var/www/php-censor.local/src/Migrations/20171014173348_removed_project_id_from_build_meta.php.Running RemovedProjectIdFromBuildMeta.Valid migration file /var/www/php-censor.local/src/Migrations/20171015123827_added_additional_columns.php.Loading class AddedAdditionalColumns from /var/www/php-censor.local/src/Migrations/20171015123827_added_additional_columns.php.Running AddedAdditionalColumns.Valid migration file /var/www/php-censor.local/src/Migrations/20171016143000_added_additional_columns2.php.Loading class AddedAdditionalColumns2 from /var/www/php-censor.local/src/Migrations/20171016143000_added_additional_columns2.php.Running AddedAdditionalColumns2.Valid migration file /var/www/php-censor.local/src/Migrations/20171019143346_added_additional_columns3.php.Loading class AddedAdditionalColumns3 from /var/www/php-censor.local/src/Migrations/20171019143346_added_additional_columns3.php.Running AddedAdditionalColumns3.Valid migration file /var/www/php-censor.local/src/Migrations/20171209135004_added_new_label_for_errors.php.Loading class AddedNewLabelForErrors from /var/www/php-censor.local/src/Migrations/20171209135004_added_new_label_for_errors.php.Running AddedNewLabelForErrors.Valid migration file /var/www/php-censor.local/src/Migrations/20180223052715_added_request_branch_to_build.php.Loading class AddedRequestBranchToBuild from /var/www/php-censor.local/src/Migrations/20180223052715_added_request_branch_to_build.php.Running AddedRequestBranchToBuild.Valid migration file /var/www/php-censor.local/src/Migrations/20180228024622_renamed_build_types.php.Loading class RenamedBuildTypes from /var/www/php-censor.local/src/Migrations/20180228024622_renamed_build_types.php.Running RenamedBuildTypes.Valid migration file /var/www/php-censor.local/src/Migrations/20180311165225_removed_last_commit_from_project.php.Loading class RemovedLastCommitFromProject from /var/www/php-censor.local/src/Migrations/20180311165225_removed_last_commit_from_project.php.Running RemovedLastCommitFromProject.Valid migration file /var/www/php-censor.local/src/Migrations/20180414075057_added_overwrite_config_field_to_project.php.Loading class AddedOverwriteConfigFieldToProject from /var/www/php-censor.local/src/Migrations/20180414075057_added_overwrite_config_field_to_project.php.Running AddedOverwriteConfigFieldToProject.Valid migration file /var/www/php-censor.local/src/Migrations/20180911140934_build_error_hash_index.php.Loading class BuildErrorHashIndex from /var/www/php-censor.local/src/Migrations/20180911140934_build_error_hash_index.php.Running BuildErrorHashIndex.Valid migration file /var/www/php-censor.local/src/Migrations/20181117121313_fix_plugins_names.php.Loading class FixPluginsNames from /var/www/php-censor.local/src/Migrations/20181117121313_fix_plugins_names.php.Running FixPluginsNames.Valid migration file /var/www/php-censor.local/src/Migrations/20190104014318_add_build_errors_totals.php.Loading class AddBuildErrorsTotals from /var/www/php-censor.local/src/Migrations/20190104014318_add_build_errors_totals.php.Running AddBuildErrorsTotals. == 20171014173348 RemovedProjectIdFromBuildMeta: migratingSTART TRANSACTION -- Altering table build_metaALTER TABLE `build_meta` DROP COLUMN `project_id`
Migration did not finish

Environment

  • PHP version

PHP 7.2.11-4+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov 4 2018 05:10:57) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.11-4+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

  • PHP Censor version
    1.0.0

  • Operating System
    Linux SaaS 4.4.0-117-generic #141-Ubuntu SMP Tue Mar 13 11:58:07 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux* PHP version

  • MySQL/PostgreSQL version
    mysql Ver 14.14 Distrib 5.7.24, for Linux (x86_64) using EditLine wrapper

@bolechen

This comment has been minimized.

Copy link

bolechen commented Jan 8, 2019

come from phpci, thx for the new repo

@bolechen bolechen changed the title [Bug] Can not install [Bug] Can not install at ubuntu & php 7.2 Jan 8, 2019

@corpsee corpsee added this to the Version 1.0 milestone Jan 8, 2019

@corpsee

This comment has been minimized.

Copy link
Member

corpsee commented Jan 8, 2019

@bolechen Thanks. Are you installing on empty database or using existing database?

corpsee added a commit that referenced this issue Jan 8, 2019

@corpsee

This comment has been minimized.

Copy link
Member

corpsee commented Jan 8, 2019

Fixed in branch migrations-fix. @bolechen Can you check installation from the branch?

@bolechen

This comment has been minimized.

Copy link

bolechen commented Jan 9, 2019

Fixed in branch migrations-fix. @bolechen Can you check installation from the branch?

migrations-fix works for me, cool

@corpsee

This comment has been minimized.

Copy link
Member

corpsee commented Jan 9, 2019

@bolechen Thank you for testing! I have just released version 1.0.1 with fix.

@corpsee corpsee closed this Jan 9, 2019

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