Download the PHP package thecodingmachine/dbal-fluid-schema-builder without Composer

On this page you can find all versions of the php package thecodingmachine/dbal-fluid-schema-builder. 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 dbal-fluid-schema-builder

Latest Stable Version Total Downloads Latest Unstable Version License Scrutinizer Code Quality Build Status Coverage Status

Fluid schema builder for Doctrine DBAL

Build and modify your database schema using DBAL and a fluid syntax.

Why?

Doctrine DBAL provides a powerful API to alter your database schema. This library is a wrapper around the DBAL standard API to provide a shorter, quicker syntax for day-to-day use. It provides shortcuts and syntactic sugars to make you efficient.

IDE friendly

You can use the autocomplete of your preferred IDE (PHPStorm, Eclipse PDT, Netbeans...) to build your schema easily. No need to look at the docs anymore!

Static code analysis

Your favorite static PHP code analyzer (Scrutinizer, PHPStan...) can catch errors for you! For instance, each database type is a PHP method, so no typos anymore in the column type - ... was it 'INT' or 'INTEGER' already? :)

Why not?

The fluid schema builders aims at solving the cases you encounter in 99% of your schemas in a concise way. It does not cover the whole possible use cases and there is no aim to target that goal.

For instance, if you have foreign keys on several columns, you cannot use FluidSchema. You should fallback to classic DBAL.

Comparison with DBAL "native" API

Instead of:

you write:

Features

FluidSchema does its best to make your life easier.

Tables and column types

Shortcut methods:

Creating indexes:

Creating unique indexes:

Make a column nullable:

Set the default value of a column:

Create a foreign key

Note: The foreign key will be automatically created on the primary table of the table "countries". The type of the "country_id" column will be exactly the same as the type of the primary key of the "countries" table.

Create a jointure table (aka associative table) between 2 tables:

Add a comment to a column:

Declare a primary key:

Declare an inheritance relationship between 2 tables:

In SQL, there is no notion of "inheritance" like with PHP objects. However, a common way to model inheritance is to write one table for the base class (containing the base columns/properties) and then one table per extended class containing the additional columns/properties. Each extended table has a primary key that is also a foreign key pointing to the base table.

The extends method will automatically create a primary key with the same name and same type as the extended table. It will also make sure this primary key is a foreign key pointing to the extended table.

Automatic 'quoting' of table and column names

By default, the fluid-schema-builder will not quote your identifiers (because it does not know what database you use).

This means that you cannot create an item with a reserved keyword.

However, if you give to fluid-schema-builder your database platform at build time, then it will quote all identifiers by default. No more nasty surprises!


All versions of dbal-fluid-schema-builder with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
doctrine/dbal Version ^3.0
doctrine/inflector Version ^1.4 || ^2.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 thecodingmachine/dbal-fluid-schema-builder contains the following files

Loading the files please wait ....