Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-107396

alter_column_type command does not modify nullable feature

    Details

      Description

      Steps to reproduce it:

      1. Startup master
      2. Go to Groovy script and execute this:
      import com.liferay.portal.kernel.dao.db.DB;
      import com.liferay.portal.kernel.dao.db.DBManagerUtil;
      import com.liferay.portal.kernel.dao.db.DBInspector;
      import com.liferay.portal.kernel.dao.jdbc.DataAccess;
      import java.sql.Connection;Connection con = 
      
      DataAccess.getConnection();
      
      DBInspector dbInspector = new DBInspector(con);
      
      DB db = DBManagerUtil.getDB();
      
      db.runSQL("alter_column_type Ticket companyId LONG not null");
      
      out.println(dbInspector.hasColumnType("Ticket", "companyId", "LONG not null")); 

      Results:

      Prints false because the column is still nullable

      Expected results:

      Prints true because the column is not null

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brian.chan Brian Chan
              Reporter:
              alberto.chaparro Alberto Chaparro
              Engineering Assignee:
              Alberto Chaparro
              Recent user:
              Alberto Chaparro
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  Master