6.0.0-beta1
7/3/25

[#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 11/09/2016 (3158 days ago)
Due
Updated 11/10/2016 (3157 days ago)
Assigned
Resolved 11/09/2016 (3158 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/10/2016 03:37:03 PM 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.
11/10/2016 06:11:39 AM 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

11/09/2016 07:53:40 PM Michael Rubinsky Assigned to Michael Rubinsky
 
11/09/2016 07:53:33 PM Michael Rubinsky State ⇒ Resolved
 
11/09/2016 07:42:48 PM 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
11/09/2016 07:38:50 PM 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
11/09/2016 07:18:45 PM michael (at) bigmichi1 (dot) de Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ DB schema update for Horde_Service_Weather fails
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
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