-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Unsuccessful: alter table * add column
PostPosted: Mon Mar 04, 2013 5:50 pm 
Newbie

Joined: Mon Mar 04, 2013 5:42 pm
Posts: 1
When updating from Mysql 5.1.56 to a newer version of MySQL I encounter problem with automatic adding columns to existing databases.

Here's my error:

ERROR SchemaUpdate:212 - Unsuccessful: alter table Field add column symbolAfter varchar(255)

I've configures hibernate hbm2ddl as follows:

Code:
<property name="hibernate.hbm2ddl.auto">update</property>


I experience this issue no matter what environment I test it on. Locally on a Mac or on our Amazon RDS test server.

Setup:
- Mysql 5.6
- Hibernate 3.6

Hibernate configuration file:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD//EN"
        "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
    <session-factory>
        <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
        <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/***</property>
        <property name="hibernate.connection.username">root</property>
        <property name="hibernate.connection.password">******</property>
        <property name="hibernate.connection.pool_size">10</property>

        <property name="hibernate.cache.use_second_level_cache">true</property>
        <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
        <property name="net.sf.ehcache.configurationResourceName">ehcache.xml</property>
        <property name="hibernate.cache.use_query_cache">true</property>

        <property name="show_sql">true</property>
       
            <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
        <property name="hibernate.setup">true</property>
        <property name="current_session_context_class">thread</property>
        <property name="hibernate.cglib.use_reflection_optimizer">true</property>

        <!-- Drop and re-create or update the database schema on startup -->
        <property name="hibernate.hbm2ddl.auto">update</property>

       
    </session-factory>
</hibernate-configuration>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.