Public Member Functions | |
| _create_database () | |
| _drop_database ($name) | |
| _create_table ($table, $fields, $primary_keys, $keys, $if_not_exists) | |
| _drop_table ($table) | |
| _alter_table ($alter_type, $table, $column_name, $column_definition= '', $default_value= '', $null= '', $after_field= '') | |
| _rename_table ($table_name, $new_table_name) | |
Public Member Functions inherited from CI_DB_forge | |
| __construct () | |
| 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 () | |
Additional Inherited Members | |
Data Fields inherited from CI_DB_forge | |
| $fields = array() | |
| $keys = array() | |
| $primary_keys = array() | |
| $db_char_set = '' | |
| _alter_table | ( | $alter_type, | |
| $table, | |||
| $column_name, | |||
$column_definition = '', |
|||
$default_value = '', |
|||
$null = '', |
|||
$after_field = '' |
|||
| ) |
Alter table query
Generates a platform-specific query so that a table can be altered Called by add_column(), drop_column(), and column_alter(),
private
| string | the ALTER type (ADD, DROP, CHANGE) |
| string | the column name |
| string | the table name |
| string | the column definition |
| string | the default value |
| boolean | should 'NOT NULL' be added |
| string | the field after which we should add the new field |
| _create_database | ( | ) |
Create database
public
| string | the database name |
| _create_table | ( | $table, | |
| $fields, | |||
| $primary_keys, | |||
| $keys, | |||
| $if_not_exists | |||
| ) |
Create Table
private
| string | the table name |
| array | the fields |
| mixed | primary key(s) |
| mixed | key(s) |
| boolean | should 'IF NOT EXISTS' be added to the SQL |
| _drop_database | ( | $name) |
Drop database
private
| string | the database name |
| _drop_table | ( | $table) |
Drop Table
Unsupported feature in SQLite
private
| _rename_table | ( | $table_name, | |
| $new_table_name | |||
| ) |
Rename a table
Generates a platform-specific query so that a table can be renamed
private
| string | the old table name |
| string | the new table name |
1.8.4