midgardproject/midgard-core — Issue #123: update_storage does not update types to datetime
Author: feri
Created: 2011-10-30 14:06:05+00:00
State: open

The setup

* database engine: MySQL
* midgard version : latest debs from OBS

Let's say we have a schema which has a field with type string. Creating the storage for the first time will properly create the table where that field is a varchar. Now do this:

1. change the schema so that the same field becomes a datetime
2. go to mysql and drop that column from the existing table (so the update will not complain)
3. run midgardmvc update_db to update the tables (that calls midgard_storage::update_storage)
4. check the new structure with: describe
5. the field which supposed to be datetime will be a varchar(255)

If you re-create the storage (so no update) then the field will be datetime.