Download the PHP package tinyapps/db-updater without Composer

On this page you can find all versions of the php package tinyapps/db-updater. 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 db-updater

Unit Tests

Database Updater

This is a simple PHP library for managing and executing database updates. It allows you to store database updates in a directory or a single config file and easily execute them in different environments.

Each update needs a unique id. Unlike an incremental versioning this makes it possible to have independent updates (e.g. from different features and development branches) that can be automatically executed once the feature is merged or deployed.

Installation

composer require tinyapps/db-updater

The following modes are supported: Directory, JSON Config and PHP Config. You'll find examples for each in the examples folder.

In JSON/PHP modes an empty config file will be created if no file exists at the given file path. Alternatively you'll find configs in the examples folder.

Getting Started

After following the installation instructions above, you’ll need to decide which config mode to use. The directory mode, where each update is stored in a dedicated file in an updates folder, is enabled by default. Alternatively you can use the single config mode with a JSON or PHP file.

Pick your config mode

Execute Updates

Save a new update

There are two options for adding an update:

Example Code

Initialization

Execute outstanding updates

Execute a single update

Programmatically add an update

The saveNewUpdate method optionally takes a second argument containing the ID of the update. If left out, a new unique ID containing the date and a random hash (suggested) is used instead.

Unit Tests

The library contains some unit tests for each mode. To execute them, set the following environment variables and execute composer test:

You can also adjust the phpunit.xml and enter your database credentials there.


All versions of db-updater with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4.0 || ^8.0
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 tinyapps/db-updater contains the following files

Loading the files please wait ....