Merge branch 'dev' of https://git.verdnatura.es/salix into dev
This commit is contained in:
commit
aa1797d137
|
@ -472,7 +472,7 @@ gulp.task('docker-run', async () => {
|
|||
await execP('docker run -d --name dblocal -p 3306:3306 dblocal');
|
||||
await runSequenceP('docker-wait');
|
||||
} catch (err) {
|
||||
await runSequenceP('docker-image');
|
||||
await runSequenceP('docker-build');
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -4,8 +4,7 @@ WORKDIR /docker-entrypoint-initdb.d
|
|||
COPY install/ ./
|
||||
RUN chmod -R 777 .
|
||||
RUN ./install.sh
|
||||
USER mysql
|
||||
CMD ["mysqld"]
|
||||
CMD ./boot.sh
|
||||
#HEALTHCHECK --interval=5s --timeout=10s --retries=200 \
|
||||
# CMD mysqladmin ping -h 127.0.0.1 -u root || exit 1
|
||||
EXPOSE 3306
|
|
@ -6,7 +6,7 @@ mysqldump --defaults-file=connect.ini --no-create-info salix ACL >> install/dump
|
|||
echo USE `vn`; >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info vn cplusInvoiceType477 cplusSubjectOp cplusTaxBreak bookingPlanner pgc >> install/dump/03-dumpedFixtures.sql
|
||||
echo USE `vn2008`; >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info vn2008 accion_dits Gastos Tintas tarifa_componentes tarifa_componentes_series state bionic_updating_options >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info vn2008 accion_dits Gastos Tintas tarifa_componentes tarifa_componentes_series state bionic_updating_options Grupos >> install/dump/03-dumpedFixtures.sql
|
||||
echo USE `bi`; >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info bi tarifa_componentes tarifa_componentes_series >> install/dump/03-dumpedFixtures.sql
|
||||
echo USE `cache`; >> install/dump/03-dumpedFixtures.sql
|
||||
|
|
|
@ -7,7 +7,7 @@ mysqldump --defaults-file=connect.ini --no-create-info salix ACL >> install/dump
|
|||
echo "USE \`vn\`;" >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info vn cplusInvoiceType477 cplusSubjectOp cplusTaxBreak bookingPlanner pgc >> install/dump/03-dumpedFixtures.sql
|
||||
echo "USE \`vn2008\`;" >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info vn2008 accion_dits Gastos Tintas tarifa_componentes tarifa_componentes_series state bionic_updating_options >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info vn2008 accion_dits Gastos Tintas tarifa_componentes tarifa_componentes_series state bionic_updating_options Grupos>> install/dump/03-dumpedFixtures.sql
|
||||
echo "USE \`bi\`;" >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info bi tarifa_componentes tarifa_componentes_series >> install/dump/03-dumpedFixtures.sql
|
||||
echo "USE \`cache\`;" >> install/dump/03-dumpedFixtures.sql
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
find /var/lib/mysql -type f -exec touch {} \; && service mysql start
|
||||
|
||||
# Disable SQL strict mode
|
||||
mysql -u root -proot -e "SET GLOBAL sql_mode='NO_ENGINE_SUBSTITUTION';"
|
||||
|
||||
sleep infinity
|
|
@ -0,0 +1,10 @@
|
|||
USE `bs`;
|
||||
CREATE
|
||||
OR REPLACE ALGORITHM = UNDEFINED
|
||||
DEFINER = `root`@`%`
|
||||
SQL SECURITY DEFINER
|
||||
VIEW `bs`.`workerMana` AS
|
||||
SELECT
|
||||
`m`.`Id_Trabajador` AS `workerFk`, `m`.`used` AS `amount`
|
||||
FROM
|
||||
`bs`.`mana_spellers` `m`;
|
File diff suppressed because one or more lines are too long
|
@ -574,3 +574,11 @@ INSERT INTO `cache`.`cache_calc`(`id`, `cache_id`, `cacheName`, `params`, `last_
|
|||
( 1, 2, 'available', CONCAT_WS('/',1,CURDATE()), CURRENT_TIMESTAMP(), DATE_ADD(CURRENT_TIMESTAMP(),INTERVAL 15 MINUTE), CURDATE(), NULL),
|
||||
( 2, 4, 'last_buy', CONCAT_WS('/',1,CURDATE()), CURRENT_TIMESTAMP(), DATE_ADD(CURRENT_TIMESTAMP(),INTERVAL 15 MINUTE), CURDATE(), NULL),
|
||||
( 3, 8, 'visible', CONCAT_WS('/',1,CURDATE()), CURRENT_TIMESTAMP(), DATE_ADD(CURRENT_TIMESTAMP(),INTERVAL 15 MINUTE), CURDATE(), NULL);
|
||||
|
||||
INSERT INTO `bs`.`workerMana`(`workerFk`, `amount`)
|
||||
VALUES
|
||||
( 1, -500),
|
||||
( 3, 0),
|
||||
( 5, 250),
|
||||
( 6, 1000),
|
||||
( 9, 1500);
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Start MySQL service
|
||||
service mysql start
|
||||
find /var/lib/mysql -type f -exec touch {} \; && service mysql start
|
||||
|
||||
# Disable SQL strict mode
|
||||
mysql -u root -proot -e "SET GLOBAL sql_mode='NO_ENGINE_SUBSTITUTION';"
|
||||
|
@ -15,7 +15,7 @@ done
|
|||
# Import changes
|
||||
for file in changes/*/*.sql; do
|
||||
echo "Imported $file" >> log.txt
|
||||
mysql -u root -proot < $file
|
||||
mysql -u root -proot < $file
|
||||
done
|
||||
|
||||
# Import fixtures
|
||||
|
@ -23,6 +23,6 @@ echo "Imported fixtures.sql" >> log.txt
|
|||
mysql -u root -proot < dump/fixtures.sql >> log.txt
|
||||
|
||||
# Remove installation
|
||||
#rm -rf /docker-entrypoint-initdb.d
|
||||
rm -rf changes dump install.sh
|
||||
|
||||
|
||||
|
|
|
@ -4,6 +4,6 @@ describe('item filterItemTags()', () => {
|
|||
it('should call the filterItemTags method', async() => {
|
||||
let [result] = await app.models.ItemTag.filterItemTags(1);
|
||||
|
||||
expect(result.name).toEqual('Yellow');
|
||||
expect(result.name).toEqual('Blue');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@ describe('ticket getTaxes()', () => {
|
|||
it('should call the getTaxes method', done => {
|
||||
app.models.Ticket.getTaxes(1)
|
||||
.then(response => {
|
||||
expect(response[0].tax).toEqual(1.05);
|
||||
expect(response[0].tax).toEqual(6.05);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@ describe('ticket getTotal()', () => {
|
|||
it('should call the getTotal method and return the response', done => {
|
||||
app.models.Ticket.getTotal(1)
|
||||
.then(response => {
|
||||
expect(response).toEqual(11.55);
|
||||
expect(response).toEqual(248.05);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -78,7 +78,7 @@ module.exports = Self => {
|
|||
where: {
|
||||
ticketFk: ticketFk
|
||||
},
|
||||
order: 'concept ASC',
|
||||
order: 'itemFk ASC',
|
||||
include: [{
|
||||
relation: 'item',
|
||||
scope: {
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "WorkerMana",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "workerMana"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "String"
|
||||
},
|
||||
"workerFk": {
|
||||
"id": true,
|
||||
"type": "String"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"worker": {
|
||||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
"foreignKey": "workerFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -45,5 +45,16 @@
|
|||
"password": "${salixPassword}",
|
||||
"connectTimeout": 20000,
|
||||
"acquireTimeout": 20000
|
||||
},
|
||||
"bs": {
|
||||
"connector": "mysql",
|
||||
"database": "bs",
|
||||
"debug": false,
|
||||
"host": "${salixHost}",
|
||||
"port": "${salixPort}",
|
||||
"username": "${salixUser}",
|
||||
"password": "${salixPassword}",
|
||||
"connectTimeout": 20000,
|
||||
"acquireTimeout": 20000
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,5 +104,8 @@
|
|||
},
|
||||
"Message": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"WorkerMana": {
|
||||
"dataSource": "bs"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue