Schema
in package
Leaf DB Schema [WIP] --- One file to rule them all.
Tags
Table of Contents
Properties
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
$connection
protected
static Manager
$connection
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
boolreset()
Reset a database table
public
static reset(string $fileToReset) : bool
Parameters
- $fileToReset : string
Return values
boolrollback()
Rollback db to a previous state
public
static rollback(string $fileToRollback[, int $step = 1 ]) : bool
Parameters
- $fileToRollback : string
- $step : int = 1
Return values
boolseed()
Seed a database table from schema file
public
static seed(string $fileToSeed) : bool
Parameters
- $fileToSeed : string
-
The name of the schema file
Return values
boolsetDbConnection()
Set the internal db connection
public
static setDbConnection(mixed $connection) : void
Parameters
- $connection : mixed