Autobase Plugin

autoIncrement : true breaks migrations

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch Submitted:
    Yes

Description

Using version 0.8.5

the following change set causes an error due to ColumnConfig.setAutoIncrement taking a boolean and not a string

column( autoIncrement: true, name: "ID", type: "BIGINT" )		{
			constraints( nullable: "false", primaryKey: "true", primaryKeyName: "SYS_IDX_48" )
		}

I worked around it with this patch for ColumnCatcher.groovy - line 51

try {
                        col."set${StringUtils.capitalize(it.key)}"(it.value?.toString())
                    } catch (Exception e) {
                        col."set${StringUtils.capitalize(it.key)}"(it.value)
                    }

A better fix would be to check the parameter of the set method and convert the value if required.

Activity

Hide
Lee Butts added a comment -

Pull request sent,

cheers

Lee

Show
Lee Butts added a comment - Pull request sent, cheers Lee

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: