File tree 1 file changed +3
-23
lines changed
1 file changed +3
-23
lines changed Original file line number Diff line number Diff line change @@ -378,29 +378,9 @@ function mixinMigration(PostgreSQL) {
378
378
return colDefault ? ( ' DEFAULT ' + colDefault ) : '' ;
379
379
} ;
380
380
381
- /*!
382
- * Find the column type for a given model property
383
- *
384
- * @param {String } model The model name
385
- * @param {String } property The property name
386
- * @returns {String } The column type
387
- */
388
- PostgreSQL . prototype . columnDataType = function ( model , property ) {
389
- var columnMetadata = this . columnMetadata ( model , property ) ;
390
- var colType = columnMetadata && columnMetadata . dataType ;
391
- if ( colType ) {
392
- colType = colType . toUpperCase ( ) ;
393
- }
394
- var prop = this . getModelDefinition ( model ) . properties [ property ] ;
395
- if ( ! prop ) {
396
- return null ;
397
- }
398
- var colLength = columnMetadata && columnMetadata . dataLength || prop . length ;
399
- if ( colType ) {
400
- return colType + ( colLength ? '(' + colLength + ')' : '' ) ;
401
- }
402
-
403
- switch ( prop . type . name ) {
381
+ PostgreSQL . prototype . buildColumnType = function buildColumnType ( propertyDefinition ) {
382
+ var p = propertyDefinition ;
383
+ switch ( p . type . name ) {
404
384
default :
405
385
case 'String' :
406
386
case 'JSON' :
You can’t perform that action at this time.
0 commit comments