Skip to content
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

Closed
fastfire opened this issue Nov 18, 2017 · 5 comments
Closed

Column not found: 1054 Unknown column 'creator' in 'field list' #42

fastfire opened this issue Nov 18, 2017 · 5 comments

Comments

@fastfire
Copy link

fastfire commented Nov 18, 2017

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!

@cedricbonhomme
Copy link
Member

Hi,

did you first updated the models ? like this:
https://github.com/monarc-project/monarc-packer/blob/master/scripts/bootstrap.sh#L216

@fastfire
Copy link
Author

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.sh

Already up-to-date.
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
/var/www/html/monarc/module/MonarcCore /var/www/html/monarc
Already up-to-date.
/var/www/html/monarc
/var/www/html/monarc/module/MonarcFO /var/www/html/monarc
Already up-to-date.
/var/www/html/monarc

  • @uirouter/core@5.0.11 node_modules/ng_client/node_modules/@uirouter/core
  • @uirouter/angularjs@1.0.11 node_modules/ng_client/node_modules/@uirouter/angularjs
  • abbrev@1.1.1 node_modules/ng_client/node_modules/abbrev
  • angular@1.5.11 node_modules/ng_client/node_modules/angular
  • angular-animate@1.5.11 node_modules/ng_client/node_modules/angular-animate
  • angular-aria@1.5.11 node_modules/ng_client/node_modules/angular-aria
  • angular-breadcrumb@0.5.0 node_modules/ng_client/node_modules/angular-breadcrumb
  • angular-gettext@2.2.1 node_modules/ng_client/node_modules/angular-gettext
  • espree@2.2.5 node_modules/ng_client/node_modules/angular-gettext-tools/node_modules/espree
  • lodash@4.17.4 node_modules/ng_client/node_modules/angular-gettext-tools/node_modules/lodash
  • angular-legacy-sortablejs@0.4.1 node_modules/ng_client/node_modules/angular-legacy-sortablejs
  • angular-local-storage@0.2.7 node_modules/ng_client/node_modules/angular-local-storage
  • angular-material@1.1.5 node_modules/ng_client/node_modules/angular-material
  • angular-material-data-table@0.10.10 node_modules/ng_client/node_modules/angular-material-data-table
  • angular-messages@1.5.11 node_modules/ng_client/node_modules/angular-messages
  • angular-mocks@1.5.11 node_modules/ng_client/node_modules/angular-mocks
  • angular-resizable@1.2.0 node_modules/ng_client/node_modules/angular-resizable
  • angular-resource@1.5.11 node_modules/ng_client/node_modules/angular-resource
  • angular-route@1.5.11 node_modules/ng_client/node_modules/angular-route
  • angular-sanitize@1.5.11 node_modules/ng_client/node_modules/angular-sanitize
  • angular-toastr@1.7.0 node_modules/ng_client/node_modules/angular-toastr
  • trix@0.11.1 node_modules/ng_client/node_modules/angular-trix/node_modules/trix
  • angular-trix@1.0.2 node_modules/ng_client/node_modules/angular-trix
  • angular-ui-tree@2.22.6 node_modules/ng_client/node_modules/angular-ui-tree
  • ansi-regex@2.1.1 node_modules/ng_client/node_modules/ansi-regex
  • ansi-styles@2.2.1 node_modules/ng_client/node_modules/ansi-styles
  • underscore.string@2.4.0 node_modules/ng_client/node_modules/argparse/node_modules/underscore.string
  • array-find-index@1.0.2 node_modules/ng_client/node_modules/array-find-index
  • async@0.1.22 node_modules/ng_client/node_modules/async
  • binary-search@1.3.2 node_modules/ng_client/node_modules/binary-search
  • boolbase@1.0.0 node_modules/ng_client/node_modules/boolbase
  • builtin-modules@1.1.1 node_modules/ng_client/node_modules/builtin-modules
  • camelcase@2.1.1 node_modules/ng_client/node_modules/camelcase
  • lodash@3.10.1 node_modules/ng_client/node_modules/cheerio/node_modules/lodash
  • coffee-script@1.3.3 node_modules/ng_client/node_modules/coffee-script
  • colors@0.6.2 node_modules/ng_client/node_modules/colors
  • isarray@1.0.0 node_modules/ng_client/node_modules/concat-stream/node_modules/isarray
  • core-util-is@1.0.2 node_modules/ng_client/node_modules/core-util-is
  • css-what@1.0.0 node_modules/ng_client/node_modules/css-what
  • currently-unhandled@0.4.1 node_modules/ng_client/node_modules/currently-unhandled
  • dateformat@1.0.2-1.2.3 node_modules/ng_client/node_modules/dateformat
  • decamelize@1.2.0 node_modules/ng_client/node_modules/decamelize
  • domelementtype@1.1.3 node_modules/ng_client/node_modules/dom-serializer/node_modules/domelementtype
  • domelementtype@1.3.0 node_modules/ng_client/node_modules/domelementtype
  • domhandler@2.3.0 node_modules/ng_client/node_modules/domhandler
  • domutils@1.4.3 node_modules/ng_client/node_modules/domutils
  • entities@1.1.1 node_modules/ng_client/node_modules/entities
  • dom-serializer@0.1.0 node_modules/ng_client/node_modules/dom-serializer
  • escape-string-regexp@1.0.5 node_modules/ng_client/node_modules/escape-string-regexp
  • esprima@1.0.4 node_modules/ng_client/node_modules/esprima
  • eventemitter2@0.4.14 node_modules/ng_client/node_modules/eventemitter2
  • exit@0.1.2 node_modules/ng_client/node_modules/exit
  • lodash@2.4.2 node_modules/ng_client/node_modules/findup-sync/node_modules/lodash
  • get-stdin@4.0.1 node_modules/ng_client/node_modules/get-stdin
  • getobject@0.1.0 node_modules/ng_client/node_modules/getobject
  • inherits@1.0.2 node_modules/ng_client/node_modules/glob/node_modules/inherits
  • graceful-fs@1.2.3 node_modules/ng_client/node_modules/graceful-fs
  • lodash@4.17.4 node_modules/ng_client/node_modules/grunt-contrib-uglify/node_modules/lodash
  • lodash@2.4.2 node_modules/ng_client/node_modules/grunt-legacy-log-utils/node_modules/lodash
  • underscore.string@2.3.3 node_modules/ng_client/node_modules/grunt-legacy-log-utils/node_modules/underscore.string
  • grunt-legacy-log-utils@0.1.1 node_modules/ng_client/node_modules/grunt-legacy-log-utils
  • lodash@2.4.2 node_modules/ng_client/node_modules/grunt-legacy-log/node_modules/lodash
  • underscore.string@2.3.3 node_modules/ng_client/node_modules/grunt-legacy-log/node_modules/underscore.string
  • has-ansi@2.0.0 node_modules/ng_client/node_modules/has-ansi
  • hooker@0.2.3 node_modules/ng_client/node_modules/hooker
  • grunt-legacy-log@0.1.3 node_modules/ng_client/node_modules/grunt-legacy-log
  • hosted-git-info@2.5.0 node_modules/ng_client/node_modules/hosted-git-info
  • domutils@1.5.1 node_modules/ng_client/node_modules/htmlparser2/node_modules/domutils
  • entities@1.0.0 node_modules/ng_client/node_modules/htmlparser2/node_modules/entities
  • iconv-lite@0.2.11 node_modules/ng_client/node_modules/iconv-lite
  • inherits@2.0.3 node_modules/ng_client/node_modules/inherits
  • is-arrayish@0.2.1 node_modules/ng_client/node_modules/is-arrayish
  • error-ex@1.3.1 node_modules/ng_client/node_modules/error-ex
  • is-buffer@1.1.6 node_modules/ng_client/node_modules/is-buffer
  • is-builtin-module@1.0.0 node_modules/ng_client/node_modules/is-builtin-module
  • is-utf8@0.2.1 node_modules/ng_client/node_modules/is-utf8
  • isarray@0.0.1 node_modules/ng_client/node_modules/isarray
  • kind-of@3.2.2 node_modules/ng_client/node_modules/kind-of
  • lazy-cache@1.0.4 node_modules/ng_client/node_modules/lazy-cache
  • graceful-fs@4.1.11 node_modules/ng_client/node_modules/load-json-file/node_modules/graceful-fs
  • lodash@0.9.2 node_modules/ng_client/node_modules/lodash
  • longest@1.0.1 node_modules/ng_client/node_modules/longest
  • lru-cache@2.7.3 node_modules/ng_client/node_modules/lru-cache
  • map-obj@1.0.1 node_modules/ng_client/node_modules/map-obj
  • camelcase-keys@2.1.0 node_modules/ng_client/node_modules/camelcase-keys
  • minimist@1.2.0 node_modules/ng_client/node_modules/minimist
  • moment@2.17.1 node_modules/ng_client/node_modules/moment
  • ng-file-upload@12.0.4 node_modules/ng_client/node_modules/ng-file-upload
  • ng-inline-edit@0.7.0 node_modules/ng_client/node_modules/ng-inline-edit
  • nopt@1.0.10 node_modules/ng_client/node_modules/nopt
  • nth-check@1.0.1 node_modules/ng_client/node_modules/nth-check
  • css-select@1.0.0 node_modules/ng_client/node_modules/css-select
  • number-is-nan@1.0.1 node_modules/ng_client/node_modules/number-is-nan
  • is-finite@1.0.2 node_modules/ng_client/node_modules/is-finite
  • object-assign@4.1.1 node_modules/ng_client/node_modules/object-assign
  • figures@1.7.0 node_modules/ng_client/node_modules/figures
  • pako@0.2.9 node_modules/ng_client/node_modules/pako
  • browserify-zlib@0.1.4 node_modules/ng_client/node_modules/browserify-zlib
  • parse-json@2.2.0 node_modules/ng_client/node_modules/parse-json
  • graceful-fs@4.1.11 node_modules/ng_client/node_modules/path-type/node_modules/graceful-fs
  • pify@2.3.0 node_modules/ng_client/node_modules/pify
  • pinkie@2.0.4 node_modules/ng_client/node_modules/pinkie
  • pinkie-promise@2.0.1 node_modules/ng_client/node_modules/pinkie-promise
  • path-type@1.1.0 node_modules/ng_client/node_modules/path-type
  • path-exists@2.1.0 node_modules/ng_client/node_modules/path-exists
  • find-up@1.1.2 node_modules/ng_client/node_modules/find-up
  • pofile@1.0.9 node_modules/ng_client/node_modules/pofile
  • process-nextick-args@1.0.7 node_modules/ng_client/node_modules/process-nextick-args
  • repeat-string@1.6.1 node_modules/ng_client/node_modules/repeat-string
  • align-text@0.1.4 node_modules/ng_client/node_modules/align-text
  • center-align@0.1.3 node_modules/ng_client/node_modules/center-align
  • repeating@2.0.1 node_modules/ng_client/node_modules/repeating
  • indent-string@2.1.0 node_modules/ng_client/node_modules/indent-string
  • right-align@0.1.3 node_modules/ng_client/node_modules/right-align
  • rimraf@2.2.8 node_modules/ng_client/node_modules/rimraf
  • safe-buffer@5.1.1 node_modules/ng_client/node_modules/safe-buffer
  • string_decoder@1.0.3 node_modules/ng_client/node_modules/concat-stream/node_modules/string_decoder
  • semver@5.4.1 node_modules/ng_client/node_modules/semver
  • sigmund@1.0.1 node_modules/ng_client/node_modules/sigmund
  • minimatch@0.2.14 node_modules/ng_client/node_modules/minimatch
  • glob@3.1.21 node_modules/ng_client/node_modules/glob
  • minimatch@0.3.0 node_modules/ng_client/node_modules/findup-sync/node_modules/minimatch
  • glob@3.2.11 node_modules/ng_client/node_modules/findup-sync/node_modules/glob
  • findup-sync@0.1.3 node_modules/ng_client/node_modules/findup-sync
  • signal-exit@3.0.2 node_modules/ng_client/node_modules/signal-exit
  • loud-rejection@1.6.0 node_modules/ng_client/node_modules/loud-rejection
  • sortablejs@1.7.0 node_modules/ng_client/node_modules/sortablejs
  • source-map@0.5.7 node_modules/ng_client/node_modules/source-map
  • spdx-expression-parse@1.0.4 node_modules/ng_client/node_modules/spdx-expression-parse
  • spdx-license-ids@1.2.2 node_modules/ng_client/node_modules/spdx-license-ids
  • spdx-correct@1.0.2 node_modules/ng_client/node_modules/spdx-correct
  • string_decoder@0.10.31 node_modules/ng_client/node_modules/string_decoder
  • readable-stream@1.1.14 node_modules/ng_client/node_modules/readable-stream
  • htmlparser2@3.8.3 node_modules/ng_client/node_modules/htmlparser2
  • cheerio@0.19.0 node_modules/ng_client/node_modules/cheerio
  • angular-gettext-tools@2.1.15 node_modules/ng_client/node_modules/angular-gettext-tools
  • grunt-angular-gettext@2.1.15 node_modules/ng_client/node_modules/grunt-angular-gettext
  • strip-ansi@3.0.1 node_modules/ng_client/node_modules/strip-ansi
  • strip-bom@2.0.0 node_modules/ng_client/node_modules/strip-bom
  • load-json-file@1.1.0 node_modules/ng_client/node_modules/load-json-file
  • strip-indent@1.0.1 node_modules/ng_client/node_modules/strip-indent
  • redent@1.0.0 node_modules/ng_client/node_modules/redent
  • supports-color@2.0.0 node_modules/ng_client/node_modules/supports-color
  • chalk@1.1.3 node_modules/ng_client/node_modules/chalk
  • grunt-shell@1.2.1 node_modules/ng_client/node_modules/grunt-shell
  • grunt-contrib-concat@1.0.1 node_modules/ng_client/node_modules/grunt-contrib-concat
  • trim-newlines@1.0.0 node_modules/ng_client/node_modules/trim-newlines
  • trix@0.10.2 node_modules/ng_client/node_modules/trix
  • typedarray@0.0.6 node_modules/ng_client/node_modules/typedarray
  • async@0.2.10 node_modules/ng_client/node_modules/uglify-js/node_modules/async
  • uglify-to-browserify@1.0.2 node_modules/ng_client/node_modules/uglify-to-browserify
  • underscore@1.7.0 node_modules/ng_client/node_modules/underscore
  • argparse@0.1.16 node_modules/ng_client/node_modules/argparse
  • js-yaml@2.0.5 node_modules/ng_client/node_modules/js-yaml
  • underscore.string@2.2.1 node_modules/ng_client/node_modules/underscore.string
  • uri-path@1.0.0 node_modules/ng_client/node_modules/uri-path
  • util-deprecate@1.0.2 node_modules/ng_client/node_modules/util-deprecate
  • readable-stream@2.3.3 node_modules/ng_client/node_modules/concat-stream/node_modules/readable-stream
  • concat-stream@1.6.0 node_modules/ng_client/node_modules/concat-stream
  • gzip-size@1.0.0 node_modules/ng_client/node_modules/gzip-size
  • validate-npm-package-license@3.0.1 node_modules/ng_client/node_modules/validate-npm-package-license
  • normalize-package-data@2.4.0 node_modules/ng_client/node_modules/normalize-package-data
  • read-pkg@1.1.0 node_modules/ng_client/node_modules/read-pkg
  • read-pkg-up@1.0.1 node_modules/ng_client/node_modules/read-pkg-up
  • meow@3.7.0 node_modules/ng_client/node_modules/meow
  • pretty-bytes@1.0.4 node_modules/ng_client/node_modules/pretty-bytes
  • maxmin@1.1.0 node_modules/ng_client/node_modules/maxmin
  • which@1.0.9 node_modules/ng_client/node_modules/which
  • grunt-legacy-util@0.2.0 node_modules/ng_client/node_modules/grunt-legacy-util
  • grunt@0.4.5 node_modules/ng_client/node_modules/grunt
  • window-size@0.1.0 node_modules/ng_client/node_modules/window-size
  • wordwrap@0.0.2 node_modules/ng_client/node_modules/wordwrap
  • cliui@2.1.0 node_modules/ng_client/node_modules/cliui
  • camelcase@1.2.1 node_modules/ng_client/node_modules/yargs/node_modules/camelcase
  • yargs@3.10.0 node_modules/ng_client/node_modules/yargs
  • uglify-js@2.6.4 node_modules/ng_client/node_modules/uglify-js
  • grunt-contrib-uglify@1.0.2 node_modules/ng_client/node_modules/grunt-contrib-uglify
    MONARC@2.0.4 /var/www/html/monarc
    ├── ng_anr@1.0.0 (git+https://github.com/monarc-project/ng-anr.git#614d95abf92cde18a01e83a2a53638f2695b6fce)
    └── ng_client@1.0.0 (git+https://github.com/monarc-project/ng-client.git#8d7501aba136a22b7a2322dc02bbd5c234deb3c1)

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 /var/www/html/monarc/vendor/monarc/core/migrations/db
using seed path /var/www/html/monarc/vendor/monarc/core/migrations/seeds
warning no environment specified, defaulting to: common
using adapter mysql
using database monarc_common

All Done. Took 0.0991s
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

== 20160513144442 InitialDb: migrating

[PDOException]
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'amvs' already exists

migrate [-c|--configuration CONFIGURATION] [-p|--parser PARSER] [-e|--environment ENVIRONMENT] [-t|--target TARGET] [-d|--date DATE]

loadDep:ng-inline-edit → ▌ ╢████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

@uirouter/core@5.0.11 install /var/www/html/monarc/node_modules/ng_client/node_modules/@uirouter/core
node migrate/migratewarn.js

ng_client@1.0.0 (git+https://github.com/monarc-project/ng-client.git#8d7501aba136a22b7a2322dc02bbd5c234deb3c1) /var/www/html/monarc/node_modules/ng_client
├─┬ @uirouter/angularjs@1.0.11
│ └── @uirouter/core@5.0.11
├── angular@1.5.11
├── angular-animate@1.5.11
├── angular-aria@1.5.11
├── angular-breadcrumb@0.5.0
├── angular-gettext@2.2.1
├── angular-legacy-sortablejs@0.4.1
├── angular-local-storage@0.2.7
├── angular-material@1.1.5
├── angular-material-data-table@0.10.10
├── angular-messages@1.5.11
├── angular-mocks@1.5.11
├── angular-resizable@1.2.0
├── angular-resource@1.5.11
├── angular-route@1.5.11
├── angular-sanitize@1.5.11
├── angular-toastr@1.7.0
├─┬ angular-trix@1.0.2
│ └── trix@0.11.1
├── angular-ui-tree@2.22.6
├─┬ grunt@0.4.5
│ ├── async@0.1.22
│ ├── coffee-script@1.3.3
│ ├── colors@0.6.2
│ ├── dateformat@1.0.2-1.2.3
│ ├── eventemitter2@0.4.14
│ ├── exit@0.1.2
│ ├─┬ findup-sync@0.1.3
│ │ ├─┬ glob@3.2.11
│ │ │ ├── inherits@2.0.3
│ │ │ └── minimatch@0.3.0
│ │ └── lodash@2.4.2
│ ├── getobject@0.1.0
│ ├─┬ glob@3.1.21
│ │ ├── graceful-fs@1.2.3
│ │ └── inherits@1.0.2
│ ├─┬ grunt-legacy-log@0.1.3
│ │ ├─┬ grunt-legacy-log-utils@0.1.1
│ │ │ ├── lodash@2.4.2
│ │ │ └── underscore.string@2.3.3
│ │ ├── lodash@2.4.2
│ │ └── underscore.string@2.3.3
│ ├── grunt-legacy-util@0.2.0
│ ├── hooker@0.2.3
│ ├── iconv-lite@0.2.11
│ ├─┬ js-yaml@2.0.5
│ │ ├─┬ argparse@0.1.16
│ │ │ ├── underscore@1.7.0
│ │ │ └── underscore.string@2.4.0
│ │ └── esprima@1.0.4
│ ├── lodash@0.9.2
│ ├─┬ minimatch@0.2.14
│ │ ├── lru-cache@2.7.3
│ │ └── sigmund@1.0.1
│ ├─┬ nopt@1.0.10
│ │ └── abbrev@1.1.1
│ ├── rimraf@2.2.8
│ ├── underscore.string@2.2.1
│ └── which@1.0.9
├─┬ grunt-angular-gettext@2.1.15
│ └─┬ angular-gettext-tools@2.1.15
│ ├── binary-search@1.3.2
│ ├─┬ cheerio@0.19.0
│ │ ├─┬ css-select@1.0.0
│ │ │ ├── boolbase@1.0.0
│ │ │ ├── css-what@1.0.0
│ │ │ ├── domutils@1.4.3
│ │ │ └── nth-check@1.0.1
│ │ ├─┬ dom-serializer@0.1.0
│ │ │ └── domelementtype@1.1.3
│ │ ├── entities@1.1.1
│ │ ├─┬ htmlparser2@3.8.3
│ │ │ ├── domelementtype@1.3.0
│ │ │ ├── domhandler@2.3.0
│ │ │ ├── domutils@1.5.1
│ │ │ ├── entities@1.0.0
│ │ │ └─┬ readable-stream@1.1.14
│ │ │ ├── core-util-is@1.0.2
│ │ │ ├── isarray@0.0.1
│ │ │ └── string_decoder@0.10.31
│ │ └── lodash@3.10.1
│ ├── espree@2.2.5
│ ├── lodash@4.17.4
│ └── pofile@1.0.9
├─┬ grunt-contrib-concat@1.0.1
│ ├─┬ chalk@1.1.3
│ │ ├── ansi-styles@2.2.1
│ │ ├── escape-string-regexp@1.0.5
│ │ ├─┬ has-ansi@2.0.0
│ │ │ └── ansi-regex@2.1.1
│ │ ├── strip-ansi@3.0.1
│ │ └── supports-color@2.0.0
│ └── source-map@0.5.7
├─┬ grunt-contrib-uglify@1.0.2
│ ├── lodash@4.17.4
│ ├─┬ maxmin@1.1.0
│ │ ├─┬ figures@1.7.0
│ │ │ └── object-assign@4.1.1
│ │ ├─┬ gzip-size@1.0.0
│ │ │ ├─┬ browserify-zlib@0.1.4
│ │ │ │ └── pako@0.2.9
│ │ │ └─┬ concat-stream@1.6.0
│ │ │ ├─┬ readable-stream@2.3.3
│ │ │ │ ├── isarray@1.0.0
│ │ │ │ ├── process-nextick-args@1.0.7
│ │ │ │ ├── safe-buffer@5.1.1
│ │ │ │ ├── string_decoder@1.0.3
│ │ │ │ └── util-deprecate@1.0.2
│ │ │ └── typedarray@0.0.6
│ │ └─┬ pretty-bytes@1.0.4
│ │ ├── get-stdin@4.0.1
│ │ └─┬ meow@3.7.0
│ │ ├─┬ camelcase-keys@2.1.0
│ │ │ └── camelcase@2.1.1
│ │ ├─┬ loud-rejection@1.6.0
│ │ │ ├─┬ currently-unhandled@0.4.1
│ │ │ │ └── array-find-index@1.0.2
│ │ │ └── signal-exit@3.0.2
│ │ ├── map-obj@1.0.1
│ │ ├── minimist@1.2.0
│ │ ├─┬ normalize-package-data@2.4.0
│ │ │ ├── hosted-git-info@2.5.0
│ │ │ ├─┬ is-builtin-module@1.0.0
│ │ │ │ └── builtin-modules@1.1.1
│ │ │ ├── semver@5.4.1
│ │ │ └─┬ validate-npm-package-license@3.0.1
│ │ │ ├─┬ spdx-correct@1.0.2
│ │ │ │ └── spdx-license-ids@1.2.2
│ │ │ └── spdx-expression-parse@1.0.4
│ │ ├─┬ read-pkg-up@1.0.1
│ │ │ ├─┬ find-up@1.1.2
│ │ │ │ ├── path-exists@2.1.0
│ │ │ │ └─┬ pinkie-promise@2.0.1
│ │ │ │ └── pinkie@2.0.4
│ │ │ └─┬ read-pkg@1.1.0
│ │ │ ├─┬ load-json-file@1.1.0
│ │ │ │ ├── graceful-fs@4.1.11
│ │ │ │ ├─┬ parse-json@2.2.0
│ │ │ │ │ └─┬ error-ex@1.3.1
│ │ │ │ │ └── is-arrayish@0.2.1
│ │ │ │ ├── pify@2.3.0
│ │ │ │ └─┬ strip-bom@2.0.0
│ │ │ │ └── is-utf8@0.2.1
│ │ │ └─┬ path-type@1.1.0
│ │ │ └── graceful-fs@4.1.11
│ │ ├─┬ redent@1.0.0
│ │ │ ├─┬ indent-string@2.1.0
│ │ │ │ └─┬ repeating@2.0.1
│ │ │ │ └─┬ is-finite@1.0.2
│ │ │ │ └── number-is-nan@1.0.1
│ │ │ └── strip-indent@1.0.1
│ │ └── trim-newlines@1.0.0
│ ├─┬ uglify-js@2.6.4
│ │ ├── async@0.2.10
│ │ ├── uglify-to-browserify@1.0.2
│ │ └─┬ yargs@3.10.0
│ │ ├── camelcase@1.2.1
│ │ ├─┬ cliui@2.1.0
│ │ │ ├─┬ center-align@0.1.3
│ │ │ │ ├─┬ align-text@0.1.4
│ │ │ │ │ ├─┬ kind-of@3.2.2
│ │ │ │ │ │ └── is-buffer@1.1.6
│ │ │ │ │ ├── longest@1.0.1
│ │ │ │ │ └── repeat-string@1.6.1
│ │ │ │ └── lazy-cache@1.0.4
│ │ │ ├── right-align@0.1.3
│ │ │ └── wordwrap@0.0.2
│ │ ├── decamelize@1.2.0
│ │ └── window-size@0.1.0
│ └── uri-path@1.0.0
├── grunt-shell@1.2.1
├── moment@2.17.1
├── ng-file-upload@12.0.4
├── ng-inline-edit@0.7.0 (git+https://github.com/monarc-project/ng-inline-edit.git#eafb2b67f1c808cef5b897fc391767fcbf123ae1)
├── sortablejs@1.7.0
└── trix@0.10.2

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'
npm WARN ng_client@1.0.0 license should be a valid SPDX license expression
/var/www/html/monarc/node_modules/ng_client /var/www/html/monarc
Running "concat:angularCommonLibsJs" (concat) task

Running "concat:angularCommonLibsCss" (concat) task

Done, without errors.
/var/www/html/monarc
/var/www/html/monarc/node_modules/ng_client /var/www/html/monarc
Running "nggettext_compile:all" (nggettext_compile) task

Done, without errors.
Running "concat:angularCommonLibsJs" (concat) task

Running "concat:angularCommonLibsCss" (concat) task

Done, without errors.
651 translated messages.
651 translated messages.
651 translated messages.
651 translated messages.

php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php

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]

@cedricbonhomme
Copy link
Member

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.
Maybe you should test with the vagrant bootstrap file in this repository.

$ 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.

@fastfire
Copy link
Author

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!

@cedricbonhomme
Copy link
Member

You're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants