2381-mariaDB #374

Merged
joan merged 10 commits from 2381-mariaDB into dev 2020-09-28 06:25:32 +00:00
8 changed files with 13 additions and 17 deletions

View File

@ -1,4 +1,4 @@
FROM mysql:8.0.18
FROM mariadb:10.4.13
ENV MYSQL_ROOT_PASSWORD root
ENV TZ Europe/Madrid
@ -7,9 +7,9 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates \
&& curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \
&& echo "deb http://apt.verdnatura.es/ stretch main" > /etc/apt/sources.list.d/vn.list \
&& echo "deb http://apt.verdnatura.es/ jessie main" > /etc/apt/sources.list.d/vn.list \
&& apt-get update \
&& apt-get install -y vn-mysql libmysqlclient21 \
&& apt-get install -y vn-mariadb \
&& apt-get purge -y --auto-remove curl ca-certificates \
&& rm -rf /var/lib/apt/lists/*
@ -19,16 +19,16 @@ COPY docker/docker-init.sh docker/docker-start.sh /usr/local/bin/
RUN mkdir /mysql-data \
&& chown -R mysql:mysql /mysql-data
WORKDIR /docker-entrypoint-initdb.d
COPY dump /docker-boot/dump
COPY changes /docker-boot/changes
COPY import-changes.sh config.ini /docker-boot/
COPY dump dump
COPY docker/docker-boot.sh /docker-entrypoint-initdb.d/
COPY changes import/changes
COPY import-changes.sh config.ini import/
ARG STAMP=unknown
RUN gosu mysql docker-init.sh mysqld \
&& rm -rf /docker-entrypoint-initdb.d/*
&& rm -rf /docker-entrypoint-initdb.d/* \
&& rm -rf /docker-boot
USER mysql
ENTRYPOINT ["docker-start.sh"]

View File

@ -1,5 +1,6 @@
#!/bin/bash
cd /docker-boot
export MYSQL_PWD=root
mysql_import() {
@ -11,7 +12,7 @@ mysql_import() {
mysql_import dump/structure.sql
mysql_import dump/mysqlPlugins.sql
mysql_import dump/dumpedFixtures.sql
import/import-changes.sh
./import-changes.sh
mysql_import dump/fixtures.sql
echo "[INFO] -> Import finished"

View File

@ -13,5 +13,4 @@ docker_setup_db
docker_process_init_files /docker-entrypoint-initdb.d/*
mysql_expire_root_user
docker_temp_server_stop

View File

@ -2,9 +2,7 @@
innodb_log_file_size = 4M
innodb_autoextend_increment = 4
innodb_page_size = 8K
innodb_default_row_format = COMPACT
log_bin_trust_function_creators = ON
datadir = /mysql-data
sql_mode = NO_ENGINE_SUBSTITUTION
innodb_temp_data_file_path = /tmp/ibtmp1:12M:autoextend
skip-log-bin

View File

@ -1,8 +1,6 @@
CREATE SCHEMA IF NOT EXISTS `vn2008`;
CREATE SCHEMA IF NOT EXISTS `tmp`;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';
ALTER TABLE `vn`.`itemTaxCountry` AUTO_INCREMENT = 1;
ALTER TABLE `vn`.`address` AUTO_INCREMENT = 1;
ALTER TABLE `vn`.`zoneGeo` AUTO_INCREMENT = 1;

View File

@ -24,7 +24,7 @@ describe('client consumption() filter', () => {
where: {
clientFk: 101
},
order: 'itemTypeFk, itemName, itemSize'
order: 'itemFk'
};
const result = await app.models.Client.consumption(ctx, filter);

View File

@ -3,7 +3,7 @@
url="Orders/filter"
limit="20"
data="orders"
order="landed DESC, clientFk">
order="landed DESC, clientFk, id DESC">
</vn-crud-model>
<vn-portal slot="topbar">
<vn-searchbar

View File

@ -66,7 +66,7 @@ describe('ticket-request filter()', () => {
it('should return the ticket request matching the warehouse ID', async() => {
let ctx = {req: {accessToken: {userId: 9}}, args: {warehouse: 1}};
let result = await app.models.TicketRequest.filter(ctx);
let result = await app.models.TicketRequest.filter(ctx, {order: 'id'});
let requestId = result[0].id;
expect(requestId).toEqual(3);