Download the PHP package kapcus/dbchanger without Composer

On this page you can find all versions of the php package kapcus/dbchanger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dbchanger

DbChanger

Toolkit for advanced database change (dbChange) management.

Currently supported databases:

Architecture

DbChange 12345 has its own directory. It consists of 10 fragments. Therefore 10 files:

Each file name follow mask XXXXXX_YYYYYYY_ZZZZZZZ.sql where

File _requirements.txt can contain list of required dbChanges that must be installed before this dbChange can be installed. One dbChange code per line. Empty or missing file means dbChange does not require any dbChange to be installed.

Each fragment content must be atomic from transactional perspective. E.g. Oracle does not support rolling back of DDL statements therefore all these queries must be in its own separate file.

Groups can be defined in config.local.neon file for each environment different. E.g.

User can define arbitrary number of groups and assigned arbitrary number of users into each group.

In fragment sql content placeholders can be used. Processing engine simple replace placeholder with defined value in config file which is to be replaced.

Group name can be also used as a placeholder. As a result, line of sql code will be inserted for each user assigned into the group and placeholder value will be replaced with user name.

Following notation is used:

Available Installation statuses:

Available Installation fragment statuses:

Installation

1] Install DbChanger with all necessary dependencies with

2] run sql scripts located in build folder. This will install DbChanger internal database tables. (you need to be able to create table, trigger, sequence, see grants.sql)

3] Move config.local.neon.example into dbchanger/config.local.neon and setup dbchanger.database section (this is where database for central DbChanger logic will be running).

4] run this to verify if DbChanger is properly installed and configured

Usage

1] Define your environments in dbchanger/config.local.neon.

========================================

2] Initialize the DbChange with

This command will load environment data specified in configuration file into internal DbChanger database. Now, DbChanger is aligned with your configuration and ready to serve.

========================================

3] Register dbChange (e.g. 12345) with

This command will load sql content of dbChange files into internal DbChanger database. Now, dbChange is ready to be installed on selected environment.

In case -d is specified (debug), all dependant DbChanges specified in file _requirements.txt are ignored. This is useful during development when developer needs to test one particular DbChanges and dependencies are not important.

In case -o is specified (overwrite), existing DbChange (if any) is overwritten - this is possible only if there is no pending installation of this DbChange.

Source dbChange content is searched in inputDirectory specified in config.neon

========================================

4] Install dbChange (e.g. 12345) with

This command will establish the connection with environment under specified user. Once connected, it will execute sql queries for selected dbChange, one by one. Installation is taking fragments one by one and tries to install them confirming this operation with appropriate installation fragment status. Once whole dbChange installation is successfully installed, proper installation status is set.

In case -s is specified (stop), installation will stop at the very beginning (useful in case you need to skip the first fragment)

In case -f is specified (force), the constraint which ensure that all required DbChanges are up-to-date (i.e. latest version is installed) will be ignored

All executed queries are logged into logDirectory specified in config.neon

========================================

Other functionality

DbChanger can display status of installations and all installation fragments are listed with particular attributes (e.g. display status of installation for dbChange 12345 on DEV environment)

Also all registered version of particular DbChange are listed.

========================================

In case installation fails or group is to be installed manually, manual interaction is expected. During installation, DbChanger will recognize this state and will report it. Once manually executed or fixed, it is necessary to tell DbChanger that issue has been fixed. Following commands can change status of dbChange fragment(s) (e.g. fragment F3 to status INSTALLED, fragments F3, F4 and F5 to status CANCELLED, whole installation to status NEW)

========================================

Command log can be used for displaying installation log history for given installed fragment

========================================

Command display can be useful for displaying sql content of installed fragment or installation log entry.

========================================

It can be also useful to dump dbChange or individual fragment content into the file. E.g. in case of manual dbChange when sql can be executed by separate process only. Following command will generate final sql content for environment DEV, dbChange 12345 and fragment with index 7 whole content. Output folder can be specified in configuration file.

In case -d is specified, output is dumped into standard output.

Source dbChange content is searched in inputDirectory specified in config.neon Generated content is stored in outputDirectory specified in config.neon

Special types of sql fragments

TODO


All versions of dbchanger with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
dibi/dibi Version ^3.1
nette/finder Version ^2
doctrine/orm Version 2.5.*
nette/di Version ^2.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kapcus/dbchanger contains the following files

Loading the files please wait ....