original_string: protected function generatableColumn($type, Fluent $column)
      {
          if (! $column->autoIncrement && is_null($column->generatedAs)) {
              return $type;
          }
  
          if ($column->autoIncrement && is_null($column->generatedAs)) {
              return with([
                  'integer' => 'serial',
                  'bigint' => 'bigserial',
                  'smallint' => 'smallserial',
              ])[$type];
          }
  
          $options = '';
  
          if (! is_bool($column->generatedAs) && ! empty($column->generatedAs)) {
              $options = sprintf(' (%s)', $column->generatedAs);
          }
  
          return sprintf(
              '%s generated %s as identity%s',
              $type,
              $column->always ? 'always' : 'by default',
              $options
          );
      }
code: protected function generatableColumn($type, Fluent $column)
      {
          if (! $column->autoIncrement && is_null($column->generatedAs)) {
              return $type;
          }
  
          if ($column->autoIncrement && is_null($column->generatedAs)) {
              return with([
                  'integer' => 'serial',
                  'bigint' => 'bigserial',
                  'smallint' => 'smallserial',
              ])[$type];
          }
  
          $options = '';
  
          if (! is_bool($column->generatedAs) && ! empty($column->generatedAs)) {
              $options = sprintf(' (%s)', $column->generatedAs);
          }
  
          return sprintf(
              '%s generated %s as identity%s',
              $type,
              $column->always ? 'always' : 'by default',
              $options
          );
      }
code_tokens: protected function generatableColumn ( $ type , Fluent $ column ) { if ( ! $ column -> autoIncrement && is_null ( $ column -> generatedAs ) ) { return $ type ; } if ( $ column -> autoIncrement && is_null ( $ column -> generatedAs ) ) { return with ( [ 'integer' => 'serial' , 'bigint' => 'bigserial' , 'smallint' => 'smallserial' , ] ) [ $ type ] ; } $ options = '' ; if ( ! is_bool ( $ column -> generatedAs ) && ! empty ( $ column -> generatedAs ) ) { $ options = sprintf ( ' (%s)' , $ column -> generatedAs ) ; } return sprintf ( '%s generated %s as identity%s' , $ type , $ column -> always ? 'always' : 'by default' , $ options ) ; }
docstring: Create the column definition for a generatable column.
  
  @param  string  $type
  @param  \Illuminate\Support\Fluent  $column
  @return string
docstring_tokens: Create the column definition for a generatable column .