-
Notifications
You must be signed in to change notification settings - Fork 38
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
Column not found: 1054 Unknown column 'creator' in 'field list' #42
Comments
Hi, did you first updated the models ? like this: |
Hi Cedric, I tried the command follow by the 'php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php' command, but receive the same error: ./scripts/update-all.shAlready up-to-date.
Database backup not configured. Skipping. using config file ./vendor/monarc/core/migrations/phinx.php All Done. Took 0.0991s using config file ./vendor/monarc/frontoffice/migrations/phinx.php == 20160513144442 InitialDb: migrating [PDOException] migrate [-c|--configuration CONFIGURATION] [-p|--parser PARSER] [-e|--environment ENVIRONMENT] [-t|--target TARGET] [-d|--date DATE] loadDep:ng-inline-edit → ▌ ╢████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
ng_client@1.0.0 (git+https://github.com/monarc-project/ng-client.git#8d7501aba136a22b7a2322dc02bbd5c234deb3c1) /var/www/html/monarc/node_modules/ng_client npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/monarc/node_modules/ng_client/node_modules/angular-gettext-tools/package.json' Running "concat:angularCommonLibsCss" (concat) task Done, without errors. Done, without errors. Running "concat:angularCommonLibsCss" (concat) task Done, without errors. php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.phpPhinx by Rob Morgan - https://phinx.org. 0.5.5 using config file ./vendor/monarc/frontoffice/migrations/phinx.php == AdminUserInit: seeding [PDOException] seed:run [-c|--configuration CONFIGURATION] [-p|--parser PARSER] [-e|--environment ENVIRONMENT] [-s|--seed SEED] |
The command scripts/update-alls.sh failed to update the client models. As you can see in the content you pasted: using config file ./vendor/monarc/frontoffice/migrations/phinx.php
using config parser php
using migration path /var/www/html/monarc/vendor/monarc/frontoffice/migrations/db
using seed path /var/www/html/monarc/vendor/monarc/frontoffice/migrations/seeds
warning no environment specified, defaulting to: cli
using adapter mysql
using database monarc_cli
== 20160513144442 InitialDb: migrating
[PDOException]
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'amvs' already exists This is really strange. It is normally possible to launch this script several times. It is used for the updates. For example, I just relaunched it in my VM: ubuntu@ubuntu-zesty:~/monarc$ sudo ./scripts/update-all.sh
The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is SHA256:Gl7E1IomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.112' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating optimized autoload files
~/monarc/module/MonarcCore ~/monarc
Already up-to-date.
~/monarc
~/monarc/module/MonarcFO ~/monarc
Already up-to-date.
~/monarc
~/monarc/node_modules/ng_client ~/monarc
Already up-to-date.
~/monarc
~/monarc/node_modules/ng_anr ~/monarc
Already up-to-date.
~/monarc
Database backup not configured. Skipping.
Phinx by Rob Morgan - https://phinx.org. 0.5.5
using config file ./vendor/monarc/core/migrations/phinx.php
using config parser php
using migration path /home/ubuntu/monarc/vendor/monarc/core/migrations/db
using seed path /home/ubuntu/monarc/vendor/monarc/core/migrations/seeds
warning no environment specified, defaulting to: common
using adapter mysql
using database monarc_common
All Done. Took 0.1728s
Phinx by Rob Morgan - https://phinx.org. 0.5.5
using config file ./vendor/monarc/frontoffice/migrations/phinx.php
using config parser php
using migration path /home/ubuntu/monarc/vendor/monarc/frontoffice/migrations/db
using seed path /home/ubuntu/monarc/vendor/monarc/frontoffice/migrations/seeds
warning no environment specified, defaulting to: cli
using adapter mysql
using database monarc_cli
All Done. Took 0.0442s So here as you can see the database monarc_cli has been updated. This is important for the following commands (which creates the first user). I also just tested with an installation from scratch with Vagrant, and it works. Vagrant is really convenient for test/dev. $ git clone https://github.com/monarc-project/MonarcAppFO.git
$ cd MonarcAppFO/vagrant
$ vagrant up
[...snip...]
==> default:
==> default: --- Create initial user and client ---
==> default: Phinx by Rob Morgan - https://phinx.org. 0.5.5
==> default: using config file ./vendor/monarc/frontoffice/migrations/phinx.php
==> default: using config parser php
==> default: using migration path /home/ubuntu/monarc/vendor/monarc/frontoffice/migrations/db
==> default: using seed path /home/ubuntu/monarc/vendor/monarc/frontoffice/migrations/seeds
==> default: warning no environment specified, defaulting to: cli
==> default: using adapter mysql
==> default: using database monarc_cli
==> default: == AdminUserInit: seeding
==> default: == AdminUserInit: seeded 0.0742s
==> default: All Done. Took 0.0827s
==> default:
==> default: --- Restarting Apache ---
==> default:
==> default: --- MONARC is ready! Point your Web browser to http://127.0.0.1:5001 --- This is the output I got in the end of the installation. |
Hi Cedric, hi deleted all the tables in monarc_cli database, then launched scripts/update-alls.sh command and now is all ok! Thank you! |
You're welcome! |
Hi, when I execute command 'php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php' I receive this error:
Phinx by Rob Morgan - https://phinx.org. 0.5.5
using config file ./vendor/monarc/frontoffice/migrations/phinx.php
using config parser php
using migration path /var/www/html/monarc/vendor/monarc/frontoffice/migrations/db
using seed path /var/www/html/monarc/vendor/monarc/frontoffice/migrations/seeds
warning no environment specified, defaulting to: cli
using adapter mysql
using database monarc_cli
== AdminUserInit: seeding
[PDOException]
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'creator' in 'field list'
seed:run [-c|--configuration CONFIGURATION] [-p|--parser PARSER] [-e|--environment ENVIRONMENT] [-s|--seed SEED]
Here table list of monarc_cli db:
+-------------------------+
| Tables_in_monarc_cli |
+-------------------------+
| amvs |
| anrs |
| anrs_objects |
| anrs_objects_categories |
| assets |
| clients |
| phinxlog |
+-------------------------+
And when I try to connect to monarc localhost page, I see this message:
php -S 0.0.0.0:8080 -t public/ public/index.php
PHP 7.0.22-0ubuntu0.16.04.1 Development Server started at Sun Nov 19 00:47:53 2017
Listening on http://0.0.0.0:8080
Document root is /var/www/html/monarc/public
Press Ctrl-C to quit.
[Sun Nov 19 00:49:20 2017] PHP Fatal error: Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'monarc_cli.users_roles' doesn't exist in /var/www/html/monarc/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:77
Stack trace:
#0 /var/www/html/monarc/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(77): PDO->prepare('SELECT u0_.id A...', Array)
#1 /var/www/html/monarc/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(844): Doctrine\DBAL\Driver\PDOConnection->prepare('SELECT u0_.id A...')
#2 /var/www/html/monarc/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery('SELECT u0_.id A...', Array, Array, NULL)
#3 /var/www/html/monarc/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(321): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array)
#4 /var/www/html/monarc/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(969): Doctrine\ORM\Query->_doExecute()
#5 /var/www/html/monarc/vendor/doct in /var/www/html/monarc/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 53
But I do not find any reference to users_roles in more db-bootstrap/*
Any idea?
Thank you!
The text was updated successfully, but these errors were encountered: