Download the PHP package sbwerewolf/fias-gar-data-import-tool without Composer
On this page you can find all versions of the php package sbwerewolf/fias-gar-data-import-tool. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sbwerewolf/fias-gar-data-import-tool
More information about sbwerewolf/fias-gar-data-import-tool
Files in sbwerewolf/fias-gar-data-import-tool
Package fias-gar-data-import-tool
Short Description Tool to import FIAS GAR database
License MIT
Informations about the package fias-gar-data-import-tool
FIAS GAR Data Import Tool
Tool to import FIAS GAR database.
Федеральная Информационная Адресная Система Государственный Адресный Реестр - ФИАС ГАР
How to install
composer require sbwerewolf/fias-gar-data-import-tool
How to use
Import may run in two modes:
- deploy data to empty database (SQL insert)
- import updates to working database (SQL update)
The behaviour of import command depends on ImportOptions
DTO (data
transfer object).
If ImportOptions::$doAddNewWithCheck
is false
, than import do not
checks record existence, and straight off perform SQL INSERT.
In case when ImportOptions::$doAddNewWithCheck
is true
, before do
INSERT/UPDATE, import checks record existence, and perform suitable
operation.
For perform import, you first step is define ImportOptions
, and then
exec \SbWereWolf\FiasGarDataImport\Cli\ImportCommand::run
with early
defined options.
Preliminary Steps
- Deploy database with Composer package
sbwerewolf/fias-gar-schema-deploy-tool
- Create index, in common case on (region,id) columns
Script data-import.php
Is Example Of Using of Import Command
- Create .env file with DB credentials, and other parameters
- Copy-paste test/data-import.php
- Correct all paths into test/data-import.php
- Check file mask lists, remove unnecessary
- Run script test/data-import.php
Contacts
Chat with me via messenger
All versions of fias-gar-data-import-tool with dependencies
sbwerewolf/json-serialize-trait Version ^1.0
sbwerewolf/batch-file-scripting Version ^3.0
ext-pdo Version *
ext-json Version *
ext-xmlreader Version *
ext-libxml Version *