salix/db/export-structure.sh

98 lines
3.0 KiB
Bash
Raw Normal View History

#!/bin/bash
2019-04-03 08:29:05 +00:00
SCHEMAS=(
account
2020-01-15 12:43:38 +00:00
bs
2019-04-03 08:29:05 +00:00
cache
2019-04-03 09:21:54 +00:00
edi
2019-04-03 08:29:05 +00:00
hedera
2019-04-03 09:21:54 +00:00
pbx
postgresql
2020-10-20 10:47:37 +00:00
sage
2019-04-03 09:21:54 +00:00
salix
stock
util
vn
2019-04-03 08:29:05 +00:00
)
2019-12-12 13:28:58 +00:00
IGNORETABLES=(
--ignore-table=bi.last_Id_Cubo
--ignore-table=bi.v_clientes_jerarquia
--ignore-table=bi.v_ventas_contables
--ignore-table=bs.horasSilla
--ignore-table=bs.productionIndicators
--ignore-table=bs.VentasPorCliente
--ignore-table=bs.v_ventas
--ignore-table=postgresql.currentWorkersStats
--ignore-table=vn.accounting__
--ignore-table=vn.agencyModeZone
--ignore-table=vn.agencyProvince
--ignore-table=vn.agencyWarehouse
--ignore-table=vn.botanicExport__
--ignore-table=vn.clientDefaultCompany
--ignore-table=vn.color
--ignore-table=vn.comparative
--ignore-table=vn.comparativeFilter
--ignore-table=vn.coolerPath
--ignore-table=vn.coolerPathDetail
2021-02-10 14:03:11 +00:00
--ignore-table=vn.config__
2019-12-12 13:28:58 +00:00
--ignore-table=vn.department__
--ignore-table=vn.doc
--ignore-table=vn.entity
--ignore-table=vn.especialPrice
--ignore-table=vn.exchangeInsurance
--ignore-table=vn.exchangeInsuranceInPrevious
--ignore-table=vn.exchangeReportSource
--ignore-table=vn.grant
--ignore-table=vn.grantGroup
--ignore-table=vn.invoiceCorrection__
--ignore-table=vn.itemTaxCountrySpain
2022-05-04 13:58:36 +00:00
--ignore-table=vn.itemShelvingPlacementSupplyStock__
2021-02-10 14:03:11 +00:00
--ignore-table=vn.itemFreeNumber__
2019-12-12 13:28:58 +00:00
--ignore-table=vn.mail__
--ignore-table=vn.manaSpellers
--ignore-table=vn.outgoingInvoiceKk
--ignore-table=vn.paymentExchangeInsurance
--ignore-table=vn.payrollCenter
2019-12-16 10:33:10 +00:00
--ignore-table=vn.plantpassport__
--ignore-table=vn.plantpassportAuthority__
2019-12-12 13:28:58 +00:00
--ignore-table=vn.preparationException
--ignore-table=vn.priceFixed__
--ignore-table=vn.printingQueue
--ignore-table=vn.printServerQueue__
--ignore-table=vn.promissoryNote
--ignore-table=vn.referenceRate__
--ignore-table=vn.routesControl
--ignore-table=vn.salesToPrePrepare
--ignore-table=vn.specialPrice__
--ignore-table=vn.ticketDownBuffer
--ignore-table=vn.ticketeToPreparePrepared
--ignore-table=vn.ticketObservation__
--ignore-table=vn.ticketRequest__
2021-02-10 14:03:11 +00:00
--ignore-table=vn.ticket_print__
2019-12-12 13:28:58 +00:00
--ignore-table=vn.ticketToPrepare
--ignore-table=vn.till__
--ignore-table=vn.travelThermograph__
--ignore-table=vn.travel_cloneWeekly
--ignore-table=vn.unary
--ignore-table=vn.unaryScan
--ignore-table=vn.unaryScanLine
--ignore-table=vn.unaryScanLineBuy
--ignore-table=vn.unaryScanLineExpedition
--ignore-table=vn.warehouseAlias__
--ignore-table=vn.warehouseJoined
--ignore-table=vn.workerTeam__
--ignore-table=vn.XDiario__
2021-03-30 10:28:43 +00:00
--ignore-table=sage.movContaCopia
2019-12-12 13:28:58 +00:00
)
2019-04-03 08:29:05 +00:00
mysqldump \
--defaults-file=config.production.ini \
--default-character-set=utf8 \
--no-data --comments \
--triggers --routines --events \
--databases \
${SCHEMAS[@]} \
2019-12-12 13:28:58 +00:00
${IGNORETABLES[@]} \
2019-12-16 07:48:12 +00:00
| sed 's/ AUTO_INCREMENT=[0-9]* //g' \
> dump/structure.sql