Skip to content

Modify column with a constraint on SQLS errors #152

Description

@Daemach

The following code gives the following error. It used to be a tinyint with a default constraint.

    schema.alter( "mars_in_wash_sales", function( table ) {
      table.modifyColumn( "shares", table.smallinteger( "shares").default(-999) );
  } ); 

ERROR (5.2.1-alpha+00282)

Incorrect syntax near the keyword 'CONSTRAINT'.

C:\Users\johnw.CommandBox\cfml\modules\commandbox-migrations\modules\cfmigrations\modules\qb\models\Schema\SchemaBuilder.cfc
ALTER TABLE [mars_in_wash_sales] ALTER COLUMN [shares] SMALLINT NOT NULL CONSTRAINT [df_mars_in_wash_sales_shares] DEFAULT -999

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions