Skip to content

Commit

Permalink
Salvando as SEED's
Browse files Browse the repository at this point in the history
Configuração para salvar as em um arquivo json
  • Loading branch information
rtenorioh committed Mar 27, 2023
1 parent 3005c56 commit 64c6410
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
13 changes: 10 additions & 3 deletions UPDATE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ echo "██╔═══╝ ██╔══██╗██╔══╝ ╚═
echo "██║ ██║ ██║███████╗███████║███████║ ██║ ██║╚██████╗██║ ██╗███████╗ ██║ "
echo "╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═╝ "
echo " "
echo "ATUALIZANDO PARA A VERSÃO MAIS RECENTE DO PRESS TICKET!"
echo "ATUALIZANDO PARA A VERSÃO MAIS RECENTE..."
echo " "

sleep 2
Expand Down Expand Up @@ -41,13 +41,20 @@ sudo rm -rf dist
npm run build

echo " "
echo "EXECUTANDO O MIGRATE E SEED"
echo "EXECUTANDO O DB:MIGRATE"
echo " "

sleep 2

npx sequelize db:migrate
npx sequelize db:seed

echo " "
echo "EXECUTANDO O DB:SEED:ALL"
echo " "

sleep 2

npx sequelize db:seed:all

echo " "
echo "ACESSANDO O FRONTEND"
Expand Down
2 changes: 1 addition & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dist
.env
.env.test
.wwebjs_auth

sequelizeData.json

package-lock.json
yarn.lock
Expand Down
4 changes: 3 additions & 1 deletion backend/src/config/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ module.exports = {
database: process.env.DB_NAME,
username: process.env.DB_USER,
password: process.env.DB_PASS,
logging: false
logging: false,
seederStorage: "json",
seederStoragePath: "sequelizeData.json"
};

0 comments on commit 64c6410

Please sign in to comment.