Function DatabaseConnector->alter_table_field

Definitions

sources/database.php

  • Change the type of a DB field in a table.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.Note: this function does not support ascension/descension of translatability, use promote_text_field_to_comcode for that.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: bool

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 new field type
$new_name ?ID_TEXT Null N/A N/A The new field name (null: leave name)

Return

  • Whether we failed to set an auto-increment
  • Type: boolean
  • Set: N/A
  • Range: N/A