Public Member Functions | |
_create_database ($name) | |
_drop_database ($name) | |
_process_fields ($fields) | |
_create_table ($table, $fields, $primary_keys, $keys, $if_not_exists) | |
_drop_table ($table) | |
_alter_table ($alter_type, $table, $fields, $after_field= '') | |
_rename_table ($table_name, $new_table_name) |
CI_DB_mysql_forge::_alter_table | ( | $ | alter_type, | |
$ | table, | |||
$ | fields, | |||
$ | 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 | |
array | fields | |
string | the field after which we should add the new field |
CI_DB_mysql_forge::_create_database | ( | $ | name | ) |
Create database
private
string | the database name |
CI_DB_mysql_forge::_create_table | ( | $ | table, | |
$ | fields, | |||
$ | primary_keys, | |||
$ | keys, | |||
$ | if_not_exists | |||
) |
Create Table
private
string | the table name | |
mixed | the fields | |
mixed | primary key(s) | |
mixed | key(s) | |
boolean | should 'IF NOT EXISTS' be added to the SQL |
CI_DB_mysql_forge::_drop_database | ( | $ | name | ) |
Drop database
private
string | the database name |
CI_DB_mysql_forge::_drop_table | ( | $ | table | ) |
Drop Table
private
CI_DB_mysql_forge::_process_fields | ( | $ | fields | ) |
Process Fields
private
mixed | the fields |
CI_DB_mysql_forge::_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 |