Yadup - Yet Another Database Updator Panel
Database updator for Nette/Tracy panel
For Nette 2.2 support please see the bottom.
Use the following Composer command in your existing project to add Yadup to it:
composer require meridius/yadup
Register the extension by adding the following to your
extensions: yadup: Yadup\YadupExtension
And at last don't forget to create directory for SQL updates files. Default is
%appDir%/sqlas specified below.
You can tailor the updator to your needs by creating a new section
config.neon (on the same level as
extensions). Accepted parameters with their default values are following:
yadup: dbUpdateTable: '_db_update' dbConnection: '@database.default' definerUser: '' # definer can be changed only in queries that already have one defined definerHost: '' sqlDir: '%appDir%/sql' # directory with sql script files sqlExt: '.sql' # extension of sql files; with 'dot'
For updator to work it is setting its own mapping to
Yadup\\*Module\\*Presenter which shouldn't affect you in any way.
Full DB update in used terminology is the one that should contain
DROP DATABASE or at least
DROP TABLE to prevent possible incompatibilities with consequent updates.
File naming format for SQL update files is
Nette 2.2 support
Because of incompatible changes in Nette/Database 2.3 the support for 2.2 version is moved to the separate Yadup 1.0 version which will receive support for at least some time.
composer require "meridius/yadup ~1.0.0"
Same as above, instead of:
yadup: dbConnection: '@nette.database.default'