Download the PHP package mysql/schematic without Composer

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

Schematic - Database Migrations Tool

NO LONGER MAINTAINED

Due to the fact that Schematic was never truly fully completed with all the features I wanted it to have, I'm shelving it for the time being, if anyone would like to become the new active contributer let me know. However I've now moved on to Laravel as my main framework and Laravel migrations have now taken over from Schematic.

A database migrations tool, allows for easy database maintenance in a way that is easy to setup in a continuous integration environment.

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Bitdeli Badge

Install locally via Composer


{
    require: {
        "mysql/schematic": "1.*.*"
    }
}

Install it Globally


Download the PHAR file:

wget --no-check-certificate https://github.com/andrefigueira/Schematic/raw/master/schematic.phar

Make the PHAR package executable

chmod +x schematic.phar

Move it to the user bin folder

mv schematic.phar /usr/local/bin/schematic

Then use Schematic

schematic

Schematic will now be available globally for you!

Schema format


Schema is defined in schema files, these must be stored in the schema folder in json files representing the table they are for, e.g. (Make sure that you create the schema folder in the root of your project)

~/ProjectFolder/schemas/table_name.yaml

The schema file contains all of the configuration of the database in order to create it or amend it, see an example below.

In the current version you need to pass a type and null through always, you pass the length in parenthesis on the type field.

Schematic uses all of the base MySQL values so you just need to put them into this file and they will work, if you spell something incorrectly, it will stop running and throw and exception.

Example Schema


schematic:
    name: Schematic
    version: 1.4.5
database:
    general:
        name: schematic
        charset: utf8
        collation: utf8_general_ci
        engine: InnoDB
    tables:
        hello_world:
            fields:
                id:
                    type: int(11)
                    'null': false
                    unsigned: true
                    autoIncrement: true
                    index: 'PRIMARY KEY'
                client_id:
                    type: int(24)
                    'null': false
                    unsigned: true
                    autoIncrement: false
                name:
                    type: varchar(128)
                    'null': false
                    unsigned: false
                    autoIncrement: false
                    rename: full_name
                description:
                    type: varchar(256)
                    'null': false
                    unsigned: false
                    autoIncrement: false
                created_date:
                    type: datetime
                    'null': false
                    unsigned: false
                    autoIncrement: false

Note that currently foreign keys are only added, but not removed, If created a new database with constraints, you must run the update twice to add the constraints.

Usage:

schematic [options] command [arguments]

Options:

--help -h Display this help message.

--quiet -q Do not output any message.

--verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

--version -V Display this application version.

--ansi Force ANSI output.

--no-ansi Disable ANSI output.

--no-interaction -n Do not ask any interactive question.

Available commands:

help Displays help for a command

list Lists commands

Migrations

migrations:execute Executes the database migration based on the JSON schema files

migrations:generate Generates the database schema JSON files

migrations:mapping Generates the database schema based on an existing database

The script also creates a log of all of the database changes which are made.


All versions of schematic with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
symfony/console Version v2.5.6
symfony/yaml Version *
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 mysql/schematic contains the following files

Loading the files please wait ....