cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Increase Column size of OOTB table

former_member646143
Participant
0 Likes
974

Can anybody provide me the groovy script for ALTER table

Accepted Solutions (0)

Answers (2)

Answers (2)

arvind-kumar_avinash
Active Contributor
0 Likes

Hi - I believe, you are looking for a Groovy script to alter the database table. Please try the following and let me know if it works:

  import de.hybris.platform.core.Registry
  
  conn = Registry.getCurrentTenant().getDataSource().getConnection()
  stmt = conn.createStatement()
  ddlQuery = "YOUR SQL ALTER COMMAND"
  stmt.executeUpdate(ddlQuery)
Former Member
0 Likes

Hi Mohammed , You can do like coulmntype in items .xml

                         <columntype database="oracle">
                             <value>CLOB</value>                    
                         </columntype>
                         <columntype database="sqlserver">
                             <value>nvarchar(max)</value>
                         </columntype>
                         <columntype database="mysql">
                             <value>TEXT</value>
                         </columntype>
                         <columntype>
                             <value>HYBRIS.LONG_STRING</value>
                         </columntype>
                     </persistence>

thanks, prabhakar

former_member646143
Participant
0 Likes

Thanks Prabhakar,

Can you provide me the groovy script if you have so that i can directly ALTER the column size in DB