Public Member Functions | |
CI_DB_forge () | |
create_database ($db_name) | |
drop_database ($db_name) | |
add_key ($key= '', $primary=FALSE) | |
add_field ($field= '') | |
create_table ($table= '', $if_not_exists=FALSE) | |
drop_table ($table_name) | |
rename_table ($table_name, $new_table_name) | |
add_column ($table= '', $field=array(), $after_field= '') | |
drop_column ($table= '', $column_name= '') | |
modify_column ($table= '', $field=array()) | |
_reset () | |
Public Attributes | |
$fields = array() | |
$keys = array() | |
$primary_keys = array() | |
$db_char_set = '' |
CI_DB_forge::_reset | ( | ) |
Reset
Resets table creation vars
private
CI_DB_forge::add_column | ( | $ | table = '' , |
|
$ | field = array() , |
|||
$ | after_field = '' | |||
) |
Column Add
public
string | the table name | |
string | the column name | |
string | the column definition |
CI_DB_forge::add_field | ( | $ | field = '' |
) |
Add Field
public
string | collation |
CI_DB_forge::add_key | ( | $ | key = '' , |
|
$ | primary = FALSE | |||
) |
Add Key
public
string | key | |
string | type |
CI_DB_forge::CI_DB_forge | ( | ) |
Constructor
Grabs the CI super object instance so we can access it.
CI_DB_forge::create_database | ( | $ | db_name | ) |
Create database
public
string | the database name |
CI_DB_forge::create_table | ( | $ | table = '' , |
|
$ | if_not_exists = FALSE | |||
) |
Create Table
public
string | the table name |
CI_DB_forge::drop_column | ( | $ | table = '' , |
|
$ | column_name = '' | |||
) |
Column Drop
public
string | the table name | |
string | the column name |
CI_DB_forge::drop_database | ( | $ | db_name | ) |
Drop database
public
string | the database name |
CI_DB_forge::drop_table | ( | $ | table_name | ) |
Drop Table
public
string | the table name |
CI_DB_forge::modify_column | ( | $ | table = '' , |
|
$ | field = array() | |||
) |
Column Modify
public
string | the table name | |
string | the column name | |
string | the column definition |
CI_DB_forge::rename_table | ( | $ | table_name, | |
$ | new_table_name | |||
) |
Rename Table
public
string | the old table name | |
string | the new table name |
CI_DB_forge::$db_char_set = '' |
CI_DB_forge::$fields = array() |
CI_DB_forge::$keys = array() |
CI_DB_forge::$primary_keys = array() |