Class Socialveo\Tasks\DbTask

InheritanceSocialveo\Tasks\DbTask » Phalcon\CLI\Task

Public Methods

Hide inherited methods

MethodDescriptionDefined By
createAction() Initializes the database, creates tables based on schema.sql file Socialveo\Tasks\DbTask
deleteAction() Delete data which is soft deleted Socialveo\Tasks\DbTask
dumpAction() Creates an SQL dump of the database Socialveo\Tasks\DbTask
fieldsAction() Sets up custom fields in the database based on fields definitions in config Socialveo\Tasks\DbTask
mainAction() Method is unused Socialveo\Tasks\DbTask
seedAction() Seeds database with fake data for development Socialveo\Tasks\DbTask
truncateAction() Truncates all tables Socialveo\Tasks\DbTask

Method Details

createAction() public method (available since version 1.0)

Initializes the database, creates tables based on schema.sql file

public void createAction ( array $params )
$params array

Array of command line parameters passed into task

deleteAction() public method (available since version 1.0)

Delete data which is soft deleted

public void deleteAction ( array $params )
$params array

Array of command line parameters passed into task

dumpAction() public method (available since version 1.0)

Creates an SQL dump of the database

public void dumpAction ( array $params )
$params array

Array of command line parameters passed into task

fieldsAction() public method (available since version 1.0)

Sets up custom fields in the database based on fields definitions in config

public void fieldsAction ( array $params )
$params array

Array of command line parameters passed into task

mainAction() public method (available since version 1.0)

Method is unused

public void mainAction ( array $params )
$params array

Array of command line parameters passed into task

seedAction() public method (available since version 1.0)

Seeds database with fake data for development

Examples

  • Insert all with default value

    • db seed
  • Insert 10 users

    • db seed users 10
  • Insert 100 posts

    • db seed posts 100
public void seedAction ( array $params )
$params array

Array of command line parameters passed into task

truncateAction() public method (available since version 1.0)

Truncates all tables

public void truncateAction ( array $params )
$params array

Array of command line parameters passed into task