6.0.0-git
2019-05-21

[#14508] DB schema update for Horde_Service_Weather fails
Summary DB schema update for Horde_Service_Weather fails
Queue Horde Framework Packages
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester michael (at) bigmichi1 (dot) de
Created 2016-11-09 (923 days ago)
Due
Updated 2016-11-10 (922 days ago)
Assigned
Resolved 2016-11-09 (923 days ago)
Milestone
Patch No

History
2016-11-10 15:37:03 Michael Rubinsky Comment #5 Reply to this comment
Fixed, along with some other things after actually running the 
migration on Postgres.

New package being released as we speak.
2016-11-10 06:11:39 michael (at) bigmichi1 (dot) de Comment #4 Reply to this comment
migration is still failing now with


[  INFO  ] Current Horde_Service_Weather schema version: 0
Migrating to HordeServiceWeatherAirports (1)
== 1 HordeServiceWeatherAirports: migrating 
===================================
-- createTable('horde_metar_airports', array('autoincrementKey' => array (
   0 => 'id',
)))
    -> 0.0000s
== 1 HordeServiceWeatherAirports: ERROR: Unable to populate METAR 
database. ===
== 1 HordeServiceWeatherAirports: migrated (0.4624s) 
==========================

Migrating to HordeServiceWeatherAirportsChange (2)
== 2 HordeServiceWeatherAirportsChange: migrating 
=============================
-- tables()
    -> 0.0027s
-- beginDbTransaction()
    -> 0.0001s
-- createTable('horde_metar_airports', array('autoincrementKey' => array (
   0 => 'id',
)))
    -> 0.0000s
== 2 HordeServiceWeatherAirportsChange: ERROR: SQLSTATE[22001]: String 
data, right truncated: 7 ERROR:  value too long for type character 
varying(2)
-- rollbackDbTransaction()
    -> 0.0001s
-- commitDbTransaction()
    -> 0.0000s
== 2 HordeServiceWeatherAirportsChange: migrated (1.5519s) 
====================

[  INFO  ] Ending Horde_Service_Weather schema version: 2

2016-11-09 19:53:40 Michael Rubinsky Assigned to Michael Rubinsky
 
2016-11-09 19:53:33 Michael Rubinsky State ⇒ Resolved
 
2016-11-09 19:42:48 Git Commit Comment #3 Reply to this comment
Changes have been made in Git (master):

commit c63311658669646e1173b27c5e890a34de5a2689
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Wed Nov 9 14:42:23 2016 -0500

     Bug: 14508 Need to pop off the first line of the file, too.

   
.../Horde/Service/Weather/2_horde_service_weather_airports_change.php   
  | 2 ++
  1 file changed, 2 insertions(+)

http://github.com/horde/horde/commit/c63311658669646e1173b27c5e890a34de5a2689
2016-11-09 19:38:50 Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit ccf26a76894de74c7ca73f84c70ac95aa6ed3dcf
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Wed Nov 9 14:33:31 2016 -0500

     Bug: 14508 Use default of 0 for these float fields.

  .../Service/Weather/2_horde_service_weather_airports_change.php     
| 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

http://github.com/horde/horde/commit/ccf26a76894de74c7ca73f84c70ac95aa6ed3dcf
2016-11-09 19:18:45 michael (at) bigmichi1 (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ DB schema update for Horde_Service_Weather fails
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
Reply to this comment
First migration result:

[  INFO  ] Current Horde_Service_Weather schema version: 0
Migrating to HordeServiceWeatherAirports (1)
== 1 HordeServiceWeatherAirports: migrating 
===================================
-- createTable('horde_metar_airports', array('autoincrementKey' => array (
   0 => 'id',
)))
    -> 0.0000s
== 1 HordeServiceWeatherAirports: ERROR: Unable to populate METAR 
database. ===
== 1 HordeServiceWeatherAirports: migrated (0.4674s) 
==========================

Migrating to HordeServiceWeatherAirportsChange (2)
== 2 HordeServiceWeatherAirportsChange: migrating 
=============================
-- tables()
    -> 0.0024s
-- beginDbTransaction()
    -> 0.0001s
-- createTable('horde_metar_airports', array('autoincrementKey' => array (
   0 => 'id',
)))
    -> 0.0000s
== 2 HordeServiceWeatherAirportsChange: ERROR: SQLSTATE[22P02]: 
Invalid text representation: 7 ERROR:  invalid input syntax for type 
double precision: "elevation_ft"
LINE 1: ...iso_country', 'municipality', 0.000000, 0.000000, 'elevation...
                                                              ^
-- rollbackDbTransaction()
    -> 0.0001s
-- commitDbTransaction()
    -> 0.0000s
== 2 HordeServiceWeatherAirportsChange: migrated (0.1565s) 
====================

[  INFO  ] Ending Horde_Service_Weather schema version: 2




Second attemp when i delete the first line in the csv file:

[  INFO  ] Current Horde_Service_Weather schema version: 0
Migrating to HordeServiceWeatherAirports (1)
== 1 HordeServiceWeatherAirports: migrating 
===================================
-- createTable('horde_metar_airports', array('autoincrementKey' => array (
   0 => 'id',
)))
    -> 0.0000s
== 1 HordeServiceWeatherAirports: ERROR: Unable to populate METAR 
database. ===
== 1 HordeServiceWeatherAirports: migrated (0.4670s) 
==========================

Migrating to HordeServiceWeatherAirportsChange (2)
== 2 HordeServiceWeatherAirportsChange: migrating 
=============================
-- tables()
    -> 0.0020s
-- beginDbTransaction()
    -> 0.0001s
-- createTable('horde_metar_airports', array('autoincrementKey' => array (
   0 => 'id',
)))
    -> 0.0000s
== 2 HordeServiceWeatherAirportsChange: ERROR: SQLSTATE[22P02]: 
Invalid text representation: 7 ERROR:  invalid input syntax for type 
double precision: ""
LINE 1: ...e Base', 'MD', 'US', 'Annapolis', 38.999200, -76.456000, '')
                                                                     ^
-- rollbackDbTransaction()
    -> 0.0002s
-- commitDbTransaction()
    -> 0.0000s
== 2 HordeServiceWeatherAirportsChange: migrated (0.4519s) 
====================

[  INFO  ] Ending Horde_Service_Weather schema version: 2



I'm using Postgresql with php 7.0.8 and Horde_Service_Weather-2.5.0

Saved Queries