Subversion Repositories php_users

Rev

Rev 32 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32 Rev 42
Line 286... Line 286...
286
                  if ( isset( $record['required'] ) ) {
286
                  if ( isset( $record['required'] ) ) {
287
                     $fieldDef .= $record['required'] ? ' not null ' : '';
287
                     $fieldDef .= $record['required'] ? ' not null ' : '';
288
                  }
288
                  }
289
                  if ( isset( $record['default'] ) ) {
289
                  if ( isset( $record['default'] ) ) {
290
                     $fieldDef .= sprintf( " default '%s'", $record['default'] );
290
                     $fieldDef .= sprintf( " default '%s'", $record['default'] );
-
 
291
                  } elseif ( ! empty( $record['required'] ) && strtolower($record['type']) == 'date' ) {
-
 
292
                     $fieldDef .= ' default CURRENT_TIMESTAMP';
291
                  }
293
                  }
292
                  if ( isset( $record['comment'] ) ) {
294
                  if ( isset( $record['comment'] ) ) {
293
                     $fieldDef .= "comment '" . $record['comment'] . "'";
295
                     $fieldDef .= "comment '" . $record['comment'] . "'";
294
                  }
296
                  }
295
                  $fields[] = $fieldDef;
297
                  $fields[] = $fieldDef;