From dba4e6da97a2470f359a5b462765f222f7347113 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 9 Aug 2006 17:46:16 +0000 Subject: [PATCH] Document table_column. --- lib/datalib.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/datalib.php b/lib/datalib.php index 4f7a1c66df..33275196db 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -209,17 +209,20 @@ function modify_database($sqlfile='', $sqlstring='') { /** * Add a new field to a table, or modify an existing one (if oldfield is defined). * Warning: Please be careful on primary keys, as this function will eat auto_increments + * * @uses $CFG * @uses $db - * @param string $table ? - * @param string $oldfield ? - * @param string $field ? - * @param string $type ? - * @param string $size ? - * @param string $signed ? - * @param string $default ? - * @param string $null ? - * @todo Finish documenting this function + * @param string $table the name of the table to modify. (Without the prefix.) + * @param string $oldfield If changing an existing column, the name of that column. + * @param string $field The name of the column at the end of the operation. + * @param string $type The type of the column at the end of the operation. TEXT, VARCHAR, CHAR, INTEGER, REAL, or TINYINT + * @param string $size The size of that column type. As in VARCHAR($size), or INTEGER($size). + * @param string $signed For numeric column types, whether that column is 'signed' or 'unsigned'. + * @param string $default The new default value for the column. + * @param string $null 'not null', or '' to allow nulls. + * @param string $after Which column to insert this one after. Not supported on Postgres. + * + * @return boolean Wheter the operation succeeded. */ function table_column($table, $oldfield, $field, $type='integer', $size='10', -- 2.39.5