1.2.x to 1.3.x migration script converted to a pure php script.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Fixed tickets | 
| License       | MIT