GithubHelp home page GithubHelp logo

Comments (5)

cedricbonhomme avatar cedricbonhomme commented on August 29, 2024

Hi,

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

from monarcappfo.

fastfire avatar fastfire commented on August 29, 2024

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

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 [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: 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/[email protected] install /var/www/html/monarc/node_modules/ng_client/node_modules/@uirouter/core
node migrate/migratewarn.js

[email protected] (git+https://github.com/monarc-project/ng-client.git#8d7501aba136a22b7a2322dc02bbd5c234deb3c1) /var/www/html/monarc/node_modules/ng_client
├─┬ @uirouter/[email protected]
│ └── @uirouter/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ └── [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ ├── [email protected]
│ │ │ └─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ └─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ └─┬ [email protected]
│ │ │ │ │ └── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ └─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └─┬ [email protected]
│ │ │ │ └─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ ├─┬ [email protected]
│ │ │ │ │ │ └── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ └── [email protected]
│ │ │ │ └── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] (git+https://github.com/monarc-project/ng-inline-edit.git#eafb2b67f1c808cef5b897fc391767fcbf123ae1)
├── [email protected]
└── [email protected]

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 [email protected] 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]

from monarcappfo.

cedricbonhomme avatar cedricbonhomme commented on August 29, 2024

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.

from monarcappfo.

fastfire avatar fastfire commented on August 29, 2024

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!

from monarcappfo.

cedricbonhomme avatar cedricbonhomme commented on August 29, 2024

You're welcome!

from monarcappfo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.