Function DatabaseConnector->add_table_field
Definitions
sources/database.php
- Adds a field to an existing table.Note: this function cannot add a new AUTO key, use add_auto_key for that.Note: this function cannot change the keys in the database on its own (use change_primary_key for that), although you should include * if something will be a key.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: N/A
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$table_name | ID_TEXT | required parameter | N/A | N/A | The table name |
$name | ID_TEXT | required parameter | N/A | N/A | The field name |
$type | ID_TEXT | required parameter | N/A | N/A | The field type |
$default | ?mixed | Null | N/A | N/A | The default value; for a translatable field should still be a string value (null: null default / default default) |