Skip to content

Commit

Permalink
Merge pull request #986 from dbarzin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dbarzin authored Nov 27, 2024
2 parents e353479 + f47c9f4 commit 649a9cb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 267 deletions.
86 changes: 1 addition & 85 deletions INSTALL.RedHat.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ Migrer la base de données

Mettre à jour les librairies

sudo -u apache composer update
sudo -u apache composer install

Vider les caches

Expand All @@ -366,87 +366,3 @@ Lancer l'application
Dans un autre terminal, lancer les tests

sudo -u apache php artisan dusk

## Réparer les problèmes de migraton

Mettre à jour les librairies

sudo -u apache composer update

Sauvegarder la base de données

sudo mysqldump mercator \
--ignore-table=mercator.users \
--ignore-table=mercator.roles \
--ignore-table=mercator.permissions \
--ignore-table=mercator.permission_role \
--ignore-table=mercator.role_user \
--ignore-table=mercator.migrations \
--no-create-db \
--no-create-info \
> backup_mercator_data.sql

ou (Postgres) :

pg_dump --exclude-table=users \
--exclude-table=roles \
--exclude-table=permissions \
--exclude-table=permission_role \
--exclude-table=role_user \
--exclude-table=migrations \
mercator > backup_mercator_data.sql

Then backup database users

sudo mysqldump mercator \
--tables users roles role_user \
--add-drop-table \
> backup_mercator_users.sql

ou (Postgres):

pg_dump --clean \
-t users -t roles -t role_user \
> backup_mercator_users.sql

Supprimer la base de données de Mercator

sudo mysql -e "drop database mercator;"

ou (Postgres)

dropdb mercator

Créer une nouvelle base de données

sudo mysql -e "CREATE DATABASE mercator CHARACTER SET utf8 COLLATE utf8_general_ci;"

ou (Postgres)

createdb mercator

Exécuter les migrations

sudo -u apache php artisan migrate --seed

Générer la clé

sudo -u apache php artisan key:generate

Restaurer les données

sudo mysql mercator < backup_mercator_data.sql

ou (Postgres)

psql mercator < backup_mercator_data.sql

Restaurer les utilisateurs

sudo mysql mercator < backup_mercator_users.sql

ou (Postgres)

psql mercator < backup_mercator_users.sql

Tous les problèmes de migration devraient être résolus.
18 changes: 1 addition & 17 deletions INSTALL.RedHat.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ add this line to the crontab

Update libraries

sudo -u apache composer update
sudo -u apache composer install

Clear caches

Expand All @@ -365,19 +365,3 @@ add this line to the crontab
In another terminal, run the tests

sudo -u apache php artisan dusk

## Fix migration issues

Update libraries

sudo -u apache composer update

Back up the database

sudo mysqldump mercator \
--ignore-table=mercator.users \
--ignore-table=mercator.roles \
--ignore-table=mercator.permissions \
--ignore-table=mercator.permission_role \
--ignore-table=mercator.role_user \
--ignore-table=mercator.m
86 changes: 1 addition & 85 deletions INSTALL.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ Migrer la base de données

Mettre à jour les librairies

sudo -u www-data composer update
sudo -u www-data composer install

Vider les caches

Expand All @@ -345,87 +345,3 @@ Lancer l'application
Dans un autre terminal, lancer les tests

sudo -u www-data php artisan dusk

## Réparer les problèmes de migraton

Mettre à jour les librairies

sudo -u www-data composer update

Sauvegarder la base de données

sudo mysqldump mercator \
--ignore-table=mercator.users \
--ignore-table=mercator.roles \
--ignore-table=mercator.permissions \
--ignore-table=mercator.permission_role \
--ignore-table=mercator.role_user \
--ignore-table=mercator.migrations \
--no-create-db \
--no-create-info \
> backup_mercator_data.sql

ou (Postgres) :

pg_dump --exclude-table=users \
--exclude-table=roles \
--exclude-table=permissions \
--exclude-table=permission_role \
--exclude-table=role_user \
--exclude-table=migrations \
mercator > backup_mercator_data.sql

Then backup database users

sudo mysqldump mercator \
--tables users roles role_user \
--add-drop-table \
> backup_mercator_users.sql

ou (Postgres):

pg_dump --clean \
-t users -t roles -t role_user \
> backup_mercator_users.sql

Supprimer la base de données de Mercator

sudo mysql -e "drop database mercator;"

ou (Postgres)

dropdb mercator

Créer une nouvelle base de données

sudo mysql -e "CREATE DATABASE mercator CHARACTER SET utf8 COLLATE utf8_general_ci;"

ou (Postgres)

createdb mercator

Exécuter les migrations

sudo -u www-data php artisan migrate --seed

Générer la clé

sudo -u www-data php artisan key:generate

Restaurer les données

sudo mysql mercator < backup_mercator_data.sql

ou (Postgres)

psql mercator < backup_mercator_data.sql

Restaurer les utilisateurs

sudo mysql mercator < backup_mercator_users.sql

ou (Postgres)

psql mercator < backup_mercator_users.sql

Tous les problèmes de migration devraient être résolus.
80 changes: 1 addition & 79 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ Migrate the database

Update the libraries

composer update
composer install

Empty caches

Expand Down Expand Up @@ -345,81 +345,3 @@ In another terminal, launch the tests
or to stop on first error

php artisan dusk --stop-on-error --stop-on-failure

## Repair the problems of migration

Update the libraries

composer update

Backup the database

mysqldump mercator \
--complete-insert \
--no-create-db \
--no-create-info \
--ignore-table=mercator.users \
--ignore-table=mercator.roles \
--ignore-table=mercator.permissions \
--ignore-table=mercator.permission_role \
--ignore-table=mercator.role_user \
--ignore-table=mercator.migrations \
> backup_mercator_data.sql

or (Postgres)

pg_dump --exclude-table=users \
--exclude-table=roles \
--exclude-table=permissions \
--exclude-table=permission_role \
--exclude-table=role_user \
--exclude-table=migrations \
mercator > backup_mercator_data.sql

Then backup database users

mysqldump mercator \
--complete-insert \
--tables users roles role_user
--add-drop-table \
> backup_mercator_users.sql

or (Postgres):

pg_dump --clean \
-t users -t roles -t role_user \
> backup_mercator_users.sql

Delete the Mercator database

sudo mysql -e "drop database mercator;"

Create a new database

sudo mysql -e "CREATE DATABASE mercator CHARACTER SET utf8 COLLATE utf8_general_ci;"

Run the migrations

php artisan migrate --seed

Generate the key

php artisan key:generate

Restore the data and fix errors

mysql mercator < backup_mercator_data.sql

or (Postgres)

psql mercator < backup_mercator_data.sql

Restore users

mysql mercator < backup_mercator_users.sql

or (Postgres)

psql mercator < backup_mercator_users.sql

All migration issues should be resolved.
2 changes: 1 addition & 1 deletion resources/views/admin/reports/ecosystem.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
@endif
<tr>
<td><b>{{ trans('cruds.entity.fields.is_external') }}</b></td>
<td>{{ $entity->is_external ? trans('global.yes') : trans('global.yes') }}</td>
<td>{{ $entity->is_external ? trans('global.yes') : trans('global.no') }}</td>
</tr>
<tr>
<td width="20%"><b>{{ trans('cruds.entity.fields.description') }}</b></td>
Expand Down

0 comments on commit 649a9cb

Please sign in to comment.