# New functionalities, anyone wants?

**URL:** <https://forum.liquibase.org/t/new-functionalities-anyone-wants/1365>\
**Category:** Liquibase Development\
**Created:** [December 18, 2009, 11:21am UTC](https://forum.liquibase.org/t/new-functionalities-anyone-wants/1365 "2009-12-18T11:21:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fcojavibr](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@fcojavibr](https://forum.liquibase.org/u/fcojavibr)\
**Post date:** [December 18, 2009, 11:21am UTC](https://forum.liquibase.org/t/new-functionalities-anyone-wants/1365/1 "2009-12-18T11:21:00Z")

</div>

Hello,

I had to do work in liquibase code and I could not expose here because the deadline of the project was so short. (If someone interests it, I use liquibase in a Spanish research project to manage database software unit automatically).

But now I have time to expose them:

The new functionalities are:

- Enhancement of the data types coming from Hibernate: [http://liquibase.org/forum/index.php?topic=255.0](http://liquibase.org/forum/index.php?topic=255.0)  
&nbsp; &nbsp; -\> for example: boolean, short, integer have an appriapate scale (not only number without scale)  
&nbsp; &nbsp; -\> to do this, I had to change mainly three things:  
&nbsp; &nbsp; &nbsp; &nbsp; liquibase.database.Database.HibernateDatabaseSnapshot: inside method createSnapshot(…)  
&nbsp; &nbsp; &nbsp; &nbsp; liquibase.change.Change.HibernateDatabase: introducing a new attribute: HibernateGenericDialect realDialect  
&nbsp; &nbsp; &nbsp; &nbsp; liquibase.database.structure.Column: getDataTypeString(Database database) is now based in a new method -\> getNumParensByDataType (Database database)

- ModifyDataTypes changes are supported from comparation between hibernate files and database already deployed (diff-database): [http://liquibase.org/forum/index.php?topic=212](http://liquibase.org/forum/index.php?topic=212)  
&nbsp; &nbsp; -\> to do this, I had to change mainly one thing:  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; liquibase.database.structure.Column: isDataTypeDifferent(Column otherColumn) is modified to isDataTypeDifferent(Column otherColumn, Database thisDatabase, Database otherDatabase) adding an important method: isHibernateTypeDifferent (Column hibernateColumn, Column databaseColumn, Database database)

- Rollback (inverse changes) to DDL eliminatory changes is supported: [http://liquibase.org/forum/index.php?topic=115](http://liquibase.org/forum/index.php?topic=115)  
&nbsp; &nbsp; -\> createInverses(DatabaseSnapshot snapshot) in: DropAllForeignKeyConstraintsChange, DropColumnChange, DropForeignKeyConstraintChange, DropIndexChange, DropNotNullConstraintChange (already done), DropPrimaryKeyChange, DropTableChange, DropUniqueConstraintChange, DropViewChange and ModifyDataTypeChange.  
&nbsp; &nbsp; -\> The best would be to add a option in every changeSet to select if this type of rollback is supported, gives a exception or is ignored (with a output trace for each impossible rollback exception).

- Default values from column modifications are supported in diff-database:  
&nbsp; &nbsp; -\> add defaultValue attribute to the classes: liquibase.change.core.ModifyDataTypeChange and liquibase.statement.SqlStatement.ModifyDataTypeStatement  
&nbsp; &nbsp; -\> liquibase.sqlgenerator.SqlGenerator.ModifyDataTypeGenerator shows the sql changes from default values.  
&nbsp; &nbsp; -\> The problem is that the changelog .xsd has to be changed adding the defaultValue field in the modifyColumn tag.  
&nbsp; &nbsp;

If anyone (Nathan?) wants to add any functionality to SVN liquibase code, I will do it. I can previously detail the code/classes-methods changes from the selected functionalities to add.  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [December 18, 2009, 11:21am UTC](https://forum.liquibase.org/t/new-functionalities-anyone-wants/1365/2 "2009-12-18T11:21:00Z")

</div>

Any help you could give would be greatly appreciated, all the features you listed are needed.&nbsp; The SVN repository is open for commit to anyone with a login for [http://liquibase.jira.com,](http://liquibase.jira.com,) and I evaluate the changes after commits.&nbsp; I generally find that easier than dealing with patch files.&nbsp; Since we are nearing the end of the 2.0 release and I don’t want to introduce major changes at this point, the best place to add the changes is int he “next\_version” branch.

Let me know if you have any questions

Nathan
