Leaf PHP

Schema
in package

Leaf DB Schema [WIP] --- One file to rule them all.

Tags
version
1.0

Table of Contents

Properties

$connection  : Manager

Methods

getColumnAttributes()  : mixed
Get all column attributes
migrate()  : bool
Migrate your schema file tables
reset()  : bool
Reset a database table
rollback()  : bool
Rollback db to a previous state
seed()  : bool
Seed a database table from schema file
setDbConnection()  : void
Set the internal db connection

Properties

Methods

getColumnAttributes()

Get all column attributes

public static getColumnAttributes(mixed $value) : mixed
Parameters
$value : mixed

migrate()

Migrate your schema file tables

public static migrate(string $fileToMigrate) : bool
Parameters
$fileToMigrate : string

The schema file to migrate

Return values
bool

reset()

Reset a database table

public static reset(string $fileToReset) : bool
Parameters
$fileToReset : string
Return values
bool

rollback()

Rollback db to a previous state

public static rollback(string $fileToRollback[, int $step = 1 ]) : bool
Parameters
$fileToRollback : string
$step : int = 1
Return values
bool

seed()

Seed a database table from schema file

public static seed(string $fileToSeed) : bool
Parameters
$fileToSeed : string

The name of the schema file

Return values
bool

setDbConnection()

Set the internal db connection

public static setDbConnection(mixed $connection) : void
Parameters
$connection : mixed

        
On this page

Search results