set Port.label to NULL instead of an empty string
authorDenis Ovsienko <denis@ovsienko.info>
Fri, 19 May 2017 11:04:35 +0000 (12:04 +0100)
committerDenis Ovsienko <denis@ovsienko.info>
Fri, 19 May 2017 11:04:35 +0000 (12:04 +0100)
This is how it was originally intended (also update the sample dataset).

* commitAddPortReal(): use nullIfEmptyStr()
* commitUpdatePortReal(): idem
* upgrade.php: queue an UPDATE for 0.21.0

scripts/init-sample-racks.sql
wwwroot/inc/database.php
wwwroot/inc/upgrade.php

index bc551c9..79dd931 100644 (file)
@@ -1023,10 +1023,10 @@ INSERT INTO `PortInterfaceCompat` (`iif_id`, `oif_id`) VALUES
 (1,32);
 
 INSERT INTO `Port` (`id`, `object_id`, `name`, `iif_id`, `type`, `l2address`, `reservation_comment`, `label`) VALUES
-(3057,905,'se1/0',1,32,NULL,NULL,''),
-(3058,905,'se1/1',1,32,NULL,NULL,''),
-(3059,905,'fa2/0',1,19,'00000000A001',NULL,''),
-(3060,905,'fa2/1',1,19,'00000000A002','ISP uplink',''),
+(3057,905,'se1/0',1,32,NULL,NULL,NULL),
+(3058,905,'se1/1',1,32,NULL,NULL,NULL),
+(3059,905,'fa2/0',1,19,'00000000A001',NULL,NULL),
+(3060,905,'fa2/1',1,19,'00000000A002','ISP uplink',NULL),
 (3063,906,'gi1',1,24,'00000000B001',NULL,'1'),
 (3062,906,'gi2',1,24,'00000000B002',NULL,'2'),
 (3064,906,'gi3',1,24,'00000000B003',NULL,'3'),
@@ -1035,8 +1035,8 @@ INSERT INTO `Port` (`id`, `object_id`, `name`, `iif_id`, `type`, `l2address`, `r
 (3067,906,'gi6',1,24,'00000000B006',NULL,'6'),
 (3068,906,'gi7',1,24,'00000000B007',NULL,'7'),
 (3069,906,'gi8',1,24,'00000000B008',NULL,'8'),
-(3070,907,'se1/0',1,32,NULL,NULL,''),
-(3071,907,'se1/1',1,32,NULL,NULL,''),
+(3070,907,'se1/0',1,32,NULL,NULL,NULL),
+(3071,907,'se1/1',1,32,NULL,NULL,NULL),
 (3072,915,'e1',1,19,NULL,NULL,'1'),
 (3073,915,'e2',1,19,NULL,NULL,'2'),
 (3074,915,'e3',1,19,NULL,NULL,'3'),
@@ -1047,10 +1047,10 @@ INSERT INTO `Port` (`id`, `object_id`, `name`, `iif_id`, `type`, `l2address`, `r
 (3079,915,'e8',1,19,NULL,NULL,'8'),
 (3080,910,'eth0',1,24,NULL,NULL,'1'),
 (3081,910,'eth1',1,24,NULL,NULL,'2'),
-(3082,909,'se1/0',1,32,NULL,NULL,''),
-(3083,909,'se1/1',1,32,NULL,NULL,''),
-(3084,908,'se1/0',1,32,NULL,NULL,''),
-(3085,908,'se1/1',1,32,NULL,NULL,''),
+(3082,909,'se1/0',1,32,NULL,NULL,NULL),
+(3083,909,'se1/1',1,32,NULL,NULL,NULL),
+(3084,908,'se1/0',1,32,NULL,NULL,NULL),
+(3085,908,'se1/1',1,32,NULL,NULL,NULL),
 (3086,911,'eth0',1,24,NULL,NULL,'1'),
 (3087,911,'eth1',1,24,NULL,NULL,'2'),
 (3088,912,'eth0',1,24,NULL,NULL,'1'),
@@ -1059,13 +1059,13 @@ INSERT INTO `Port` (`id`, `object_id`, `name`, `iif_id`, `type`, `l2address`, `r
 (3091,913,'eth1',1,24,NULL,NULL,'2'),
 (3092,914,'eth0',1,24,NULL,NULL,'1'),
 (3093,914,'eth1',1,24,NULL,NULL,'2'),
-(3094,917,'fa0/0',1,19,NULL,NULL,''),
-(3095,919,'bge0',1,24,NULL,NULL,''),
-(3096,919,'bge1',1,24,NULL,NULL,''),
-(3097,918,'bge0',1,24,NULL,NULL,''),
-(3098,918,'bge1',1,24,NULL,NULL,''),
-(3099,909,'fa2/0',1,19,NULL,NULL,''),
-(3100,909,'fa2/1',1,19,NULL,'ISP uplink',''),
+(3094,917,'fa0/0',1,19,NULL,NULL,NULL),
+(3095,919,'bge0',1,24,NULL,NULL,NULL),
+(3096,919,'bge1',1,24,NULL,NULL,NULL),
+(3097,918,'bge0',1,24,NULL,NULL,NULL),
+(3098,918,'bge1',1,24,NULL,NULL,NULL),
+(3099,909,'fa2/0',1,19,NULL,NULL,NULL),
+(3100,909,'fa2/1',1,19,NULL,'ISP uplink',NULL),
 (3101,926,'fa1',1,19,NULL,NULL,'1'),
 (3102,926,'fa2',1,19,NULL,NULL,'2'),
 (3103,926,'fa3',1,19,NULL,NULL,'3'),
@@ -1084,156 +1084,156 @@ INSERT INTO `Port` (`id`, `object_id`, `name`, `iif_id`, `type`, `l2address`, `r
 (3116,924,'eth1',1,24,NULL,NULL,'2'),
 (3117,925,'eth0',1,24,NULL,NULL,'1'),
 (3118,925,'eth1',1,24,NULL,NULL,'2'),
-(3119,908,'fa2/0',1,19,NULL,NULL,''),
-(3120,908,'fa2/1',1,19,NULL,'ISP uplink',''),
-(3121,907,'fa2/0',1,19,NULL,NULL,''),
-(3122,907,'fa2/1',1,19,NULL,NULL,''),
-(3123,927,'gi3/0',3,1202,NULL,'ISP uplink',''),
-(3124,927,'gi4/0',3,1202,NULL,NULL,''),
-(3125,907,'gi3/0',3,1202,NULL,'ISP uplink',''),
-(3126,907,'gi4/0',3,1202,NULL,NULL,''),
-(3127,956,'kvm',1,33,NULL,NULL,''),
-(3128,956,'eth0',1,24,NULL,NULL,''),
-(3129,956,'eth1',1,24,NULL,NULL,''),
-(3130,957,'kvm',1,33,NULL,NULL,''),
-(3131,957,'eth0',1,24,NULL,NULL,''),
-(3132,957,'eth1',1,24,NULL,NULL,''),
-(3133,958,'kvm',1,33,NULL,NULL,''),
-(3134,958,'eth0',1,24,NULL,NULL,''),
-(3135,958,'eth1',1,24,NULL,NULL,''),
-(3136,959,'kvm',1,33,NULL,NULL,''),
-(3137,959,'eth0',1,24,NULL,NULL,''),
-(3138,959,'eth1',1,24,NULL,NULL,''),
-(3139,960,'kvm',1,33,NULL,NULL,''),
-(3140,960,'eth0',1,24,NULL,NULL,''),
-(3141,960,'eth1',1,24,NULL,NULL,''),
+(3119,908,'fa2/0',1,19,NULL,NULL,NULL),
+(3120,908,'fa2/1',1,19,NULL,'ISP uplink',NULL),
+(3121,907,'fa2/0',1,19,NULL,NULL,NULL),
+(3122,907,'fa2/1',1,19,NULL,NULL,NULL),
+(3123,927,'gi3/0',3,1202,NULL,'ISP uplink',NULL),
+(3124,927,'gi4/0',3,1202,NULL,NULL,NULL),
+(3125,907,'gi3/0',3,1202,NULL,'ISP uplink',NULL),
+(3126,907,'gi4/0',3,1202,NULL,NULL,NULL),
+(3127,956,'kvm',1,33,NULL,NULL,NULL),
+(3128,956,'eth0',1,24,NULL,NULL,NULL),
+(3129,956,'eth1',1,24,NULL,NULL,NULL),
+(3130,957,'kvm',1,33,NULL,NULL,NULL),
+(3131,957,'eth0',1,24,NULL,NULL,NULL),
+(3132,957,'eth1',1,24,NULL,NULL,NULL),
+(3133,958,'kvm',1,33,NULL,NULL,NULL),
+(3134,958,'eth0',1,24,NULL,NULL,NULL),
+(3135,958,'eth1',1,24,NULL,NULL,NULL),
+(3136,959,'kvm',1,33,NULL,NULL,NULL),
+(3137,959,'eth0',1,24,NULL,NULL,NULL),
+(3138,959,'eth1',1,24,NULL,NULL,NULL),
+(3139,960,'kvm',1,33,NULL,NULL,NULL),
+(3140,960,'eth0',1,24,NULL,NULL,NULL),
+(3141,960,'eth1',1,24,NULL,NULL,NULL),
 (3142,908,'con0',1,29,NULL,NULL,'console'),
-(3143,961,'1',1,24,'01040104AA00',NULL,''),
-(3144,961,'2',1,24,'01040104AA01','for field engineer',''),
-(3145,961,'3',1,24,'01040104AA02',NULL,''),
-(3146,961,'4',1,24,'01040104AA03',NULL,''),
-(3147,961,'5',1,24,'01040104AA04',NULL,''),
-(3148,961,'6',1,24,'01040104AA05',NULL,''),
-(3149,961,'7',1,24,'01040104AA06',NULL,''),
-(3150,961,'8',1,24,'01040104AA07',NULL,''),
-(3151,961,'9',1,24,'01040104AA08',NULL,''),
-(3152,961,'10',1,24,'01040104AA09',NULL,''),
-(3153,961,'11',1,24,'01040104AA0A',NULL,''),
-(3154,961,'12',1,24,'01040104AA0B',NULL,''),
-(3155,961,'13',1,24,'01040104AA0C',NULL,''),
-(3156,961,'14',1,24,'01040104AA0D',NULL,''),
-(3157,961,'15',1,24,'01040104AA0E',NULL,''),
-(3158,961,'16',1,24,'01040104AA0F',NULL,''),
+(3143,961,'1',1,24,'01040104AA00',NULL,NULL),
+(3144,961,'2',1,24,'01040104AA01','for field engineer',NULL),
+(3145,961,'3',1,24,'01040104AA02',NULL,NULL),
+(3146,961,'4',1,24,'01040104AA03',NULL,NULL),
+(3147,961,'5',1,24,'01040104AA04',NULL,NULL),
+(3148,961,'6',1,24,'01040104AA05',NULL,NULL),
+(3149,961,'7',1,24,'01040104AA06',NULL,NULL),
+(3150,961,'8',1,24,'01040104AA07',NULL,NULL),
+(3151,961,'9',1,24,'01040104AA08',NULL,NULL),
+(3152,961,'10',1,24,'01040104AA09',NULL,NULL),
+(3153,961,'11',1,24,'01040104AA0A',NULL,NULL),
+(3154,961,'12',1,24,'01040104AA0B',NULL,NULL),
+(3155,961,'13',1,24,'01040104AA0C',NULL,NULL),
+(3156,961,'14',1,24,'01040104AA0D',NULL,NULL),
+(3157,961,'15',1,24,'01040104AA0E',NULL,NULL),
+(3158,961,'16',1,24,'01040104AA0F',NULL,NULL),
 (3159,961,'con',1,681,NULL,NULL,'console'),
 (3160,956,'ttyS0',1,681,NULL,NULL,'serial A'),
 (3161,956,'ttyS1',1,681,NULL,NULL,'serial B'),
-(3162,962,'tail1',1,446,NULL,NULL,''),
-(3163,962,'tail2',1,446,NULL,NULL,''),
-(3164,962,'tail3',1,446,NULL,NULL,''),
-(3165,962,'tail4',1,446,NULL,NULL,''),
-(3166,962,'tail5',1,446,NULL,NULL,''),
-(3167,962,'tail6',1,446,NULL,NULL,''),
-(3168,962,'tail7',1,446,NULL,NULL,''),
-(3169,962,'tail8',1,446,NULL,NULL,''),
-(3170,962,'head',1,33,NULL,'monitor connected',''),
-(3171,962,'net',1,19,'020002003333',NULL,''),
-(3178,927,'fa1/0',1,19,NULL,NULL,''),
-(3179,908,'fa1/0',1,19,NULL,NULL,''),
-(3180,955,'in',1,16,NULL,'from local distribution',''),
-(3181,955,'out1',1,1322,NULL,NULL,''),
-(3182,955,'out2',1,1322,NULL,NULL,''),
-(3183,955,'out3',1,1322,NULL,NULL,''),
-(3184,955,'out4',1,1322,NULL,NULL,''),
-(3185,955,'out5',1,1322,NULL,NULL,''),
-(3186,923,'ps',1,16,NULL,NULL,''),
-(3187,924,'ps',1,16,NULL,NULL,''),
-(3188,925,'ps',1,16,NULL,NULL,''),
-(3189,926,'ps',1,16,NULL,NULL,''),
-(3190,909,'ps',1,16,NULL,NULL,''),
-(3191,979,'gi0/1',1,24,NULL,NULL,''),
-(3192,979,'gi0/2',1,24,NULL,NULL,''),
-(3193,979,'gi0/3',1,24,NULL,NULL,''),
-(3194,979,'gi0/4',1,24,NULL,NULL,''),
-(3195,979,'gi0/5',1,24,NULL,NULL,''),
-(3196,979,'gi0/6',1,24,NULL,NULL,''),
-(3197,979,'gi0/7',1,24,NULL,NULL,''),
-(3198,979,'gi0/8',1,24,NULL,NULL,''),
-(3199,979,'gi0/9',1,24,NULL,NULL,''),
-(3200,979,'gi0/10',1,24,NULL,NULL,''),
-(3201,979,'gi0/11',1,24,NULL,NULL,''),
-(3202,979,'gi0/12',1,24,NULL,NULL,''),
-(3203,979,'gi0/13',1,24,NULL,NULL,''),
-(3204,979,'gi0/14',1,24,NULL,NULL,''),
-(3205,979,'gi0/15',1,24,NULL,NULL,''),
-(3206,979,'gi0/16',1,24,NULL,NULL,''),
-(3207,979,'gi0/17',1,24,NULL,NULL,''),
-(3208,979,'gi0/18',1,24,NULL,NULL,''),
-(3209,979,'gi0/19',1,24,NULL,NULL,''),
-(3210,979,'gi0/20',1,24,NULL,NULL,''),
-(3211,979,'gi0/21',1,24,NULL,NULL,''),
-(3212,979,'gi0/22',1,24,NULL,NULL,''),
-(3213,979,'gi0/23',1,24,NULL,NULL,''),
-(3214,979,'gi0/24',1,24,NULL,NULL,''),
-(3215,980,'gi0/0/1',1,24,NULL,NULL,''),
-(3216,980,'gi0/0/2',1,24,NULL,NULL,''),
-(3217,980,'gi0/0/3',1,24,NULL,NULL,''),
-(3218,980,'gi0/0/4',1,24,NULL,NULL,''),
-(3219,980,'gi0/0/5',1,24,NULL,NULL,''),
-(3220,980,'gi0/0/6',1,24,NULL,NULL,''),
-(3221,980,'gi0/0/7',1,24,NULL,NULL,''),
-(3222,980,'gi0/0/8',1,24,NULL,NULL,''),
-(3223,980,'gi0/0/9',1,24,NULL,NULL,''),
-(3224,980,'gi0/0/10',1,24,NULL,NULL,''),
-(3225,980,'gi0/0/11',1,24,NULL,NULL,''),
-(3226,980,'gi0/0/12',1,24,NULL,NULL,''),
-(3227,980,'gi0/0/13',1,24,NULL,NULL,''),
-(3228,980,'gi0/0/14',1,24,NULL,NULL,''),
-(3229,980,'gi0/0/15',1,24,NULL,NULL,''),
-(3230,980,'gi0/0/16',1,24,NULL,NULL,''),
-(3231,980,'gi0/0/17',1,24,NULL,NULL,''),
-(3232,980,'gi0/0/18',1,24,NULL,NULL,''),
-(3233,980,'gi0/0/19',1,24,NULL,NULL,''),
-(3234,980,'gi0/0/20',1,24,NULL,NULL,''),
-(3235,980,'gi0/0/21',1,24,NULL,NULL,''),
-(3236,980,'gi0/0/22',1,24,NULL,NULL,''),
-(3237,980,'gi0/0/23',1,24,NULL,NULL,''),
-(3238,980,'gi0/0/24',1,24,NULL,NULL,''),
-(3239,980,'gi0/0/25',1,24,NULL,NULL,''),
-(3240,980,'gi0/0/26',1,24,NULL,NULL,''),
-(3241,980,'gi0/0/27',1,24,NULL,NULL,''),
-(3242,980,'gi0/0/28',1,24,NULL,NULL,''),
-(3243,980,'gi0/0/29',1,24,NULL,NULL,''),
-(3244,980,'gi0/0/30',1,24,NULL,NULL,''),
-(3245,980,'gi0/0/31',1,24,NULL,NULL,''),
-(3246,980,'gi0/0/32',1,24,NULL,NULL,''),
-(3247,980,'gi0/0/33',1,24,NULL,NULL,''),
-(3248,980,'gi0/0/34',1,24,NULL,NULL,''),
-(3249,980,'gi0/0/35',1,24,NULL,NULL,''),
-(3250,980,'gi0/0/36',1,24,NULL,NULL,''),
-(3251,980,'gi0/0/37',1,24,NULL,NULL,''),
-(3252,980,'gi0/0/38',1,24,NULL,NULL,''),
-(3253,980,'gi0/0/39',1,24,NULL,NULL,''),
-(3254,980,'gi0/0/40',1,24,NULL,NULL,''),
-(3255,980,'gi0/0/41',1,24,NULL,NULL,''),
-(3256,980,'gi0/0/42',1,24,NULL,NULL,''),
-(3257,980,'gi0/0/43',1,24,NULL,NULL,''),
-(3258,980,'gi0/0/44',1,24,NULL,NULL,''),
-(3259,980,'gi0/0/45',1,24,NULL,NULL,''),
-(3260,980,'gi0/0/46',1,24,NULL,NULL,''),
-(3261,980,'gi0/0/47',1,24,NULL,NULL,''),
-(3262,980,'gi0/0/48',1,24,NULL,NULL,''),
-(3263,981,'gi0/1',1,24,NULL,NULL,''),
-(3264,981,'gi0/2',1,24,NULL,NULL,''),
-(3265,981,'gi0/3',1,24,NULL,NULL,''),
-(3266,981,'gi0/4',1,24,NULL,NULL,''),
-(3267,981,'gi0/5',1,24,NULL,NULL,''),
-(3268,981,'gi0/6',1,24,NULL,NULL,''),
-(3269,981,'gi0/7',1,24,NULL,NULL,''),
-(3270,981,'gi0/8',1,24,NULL,NULL,''),
-(3271,981,'gi0/9',1,24,NULL,NULL,''),
-(3272,981,'gi0/10',1,24,NULL,NULL,''),
-(3273,981,'gi0/11',1,24,NULL,NULL,''),
-(3274,981,'gi0/12',1,24,NULL,NULL,'');
+(3162,962,'tail1',1,446,NULL,NULL,NULL),
+(3163,962,'tail2',1,446,NULL,NULL,NULL),
+(3164,962,'tail3',1,446,NULL,NULL,NULL),
+(3165,962,'tail4',1,446,NULL,NULL,NULL),
+(3166,962,'tail5',1,446,NULL,NULL,NULL),
+(3167,962,'tail6',1,446,NULL,NULL,NULL),
+(3168,962,'tail7',1,446,NULL,NULL,NULL),
+(3169,962,'tail8',1,446,NULL,NULL,NULL),
+(3170,962,'head',1,33,NULL,'monitor connected',NULL),
+(3171,962,'net',1,19,'020002003333',NULL,NULL),
+(3178,927,'fa1/0',1,19,NULL,NULL,NULL),
+(3179,908,'fa1/0',1,19,NULL,NULL,NULL),
+(3180,955,'in',1,16,NULL,'from local distribution',NULL),
+(3181,955,'out1',1,1322,NULL,NULL,NULL),
+(3182,955,'out2',1,1322,NULL,NULL,NULL),
+(3183,955,'out3',1,1322,NULL,NULL,NULL),
+(3184,955,'out4',1,1322,NULL,NULL,NULL),
+(3185,955,'out5',1,1322,NULL,NULL,NULL),
+(3186,923,'ps',1,16,NULL,NULL,NULL),
+(3187,924,'ps',1,16,NULL,NULL,NULL),
+(3188,925,'ps',1,16,NULL,NULL,NULL),
+(3189,926,'ps',1,16,NULL,NULL,NULL),
+(3190,909,'ps',1,16,NULL,NULL,NULL),
+(3191,979,'gi0/1',1,24,NULL,NULL,NULL),
+(3192,979,'gi0/2',1,24,NULL,NULL,NULL),
+(3193,979,'gi0/3',1,24,NULL,NULL,NULL),
+(3194,979,'gi0/4',1,24,NULL,NULL,NULL),
+(3195,979,'gi0/5',1,24,NULL,NULL,NULL),
+(3196,979,'gi0/6',1,24,NULL,NULL,NULL),
+(3197,979,'gi0/7',1,24,NULL,NULL,NULL),
+(3198,979,'gi0/8',1,24,NULL,NULL,NULL),
+(3199,979,'gi0/9',1,24,NULL,NULL,NULL),
+(3200,979,'gi0/10',1,24,NULL,NULL,NULL),
+(3201,979,'gi0/11',1,24,NULL,NULL,NULL),
+(3202,979,'gi0/12',1,24,NULL,NULL,NULL),
+(3203,979,'gi0/13',1,24,NULL,NULL,NULL),
+(3204,979,'gi0/14',1,24,NULL,NULL,NULL),
+(3205,979,'gi0/15',1,24,NULL,NULL,NULL),
+(3206,979,'gi0/16',1,24,NULL,NULL,NULL),
+(3207,979,'gi0/17',1,24,NULL,NULL,NULL),
+(3208,979,'gi0/18',1,24,NULL,NULL,NULL),
+(3209,979,'gi0/19',1,24,NULL,NULL,NULL),
+(3210,979,'gi0/20',1,24,NULL,NULL,NULL),
+(3211,979,'gi0/21',1,24,NULL,NULL,NULL),
+(3212,979,'gi0/22',1,24,NULL,NULL,NULL),
+(3213,979,'gi0/23',1,24,NULL,NULL,NULL),
+(3214,979,'gi0/24',1,24,NULL,NULL,NULL),
+(3215,980,'gi0/0/1',1,24,NULL,NULL,NULL),
+(3216,980,'gi0/0/2',1,24,NULL,NULL,NULL),
+(3217,980,'gi0/0/3',1,24,NULL,NULL,NULL),
+(3218,980,'gi0/0/4',1,24,NULL,NULL,NULL),
+(3219,980,'gi0/0/5',1,24,NULL,NULL,NULL),
+(3220,980,'gi0/0/6',1,24,NULL,NULL,NULL),
+(3221,980,'gi0/0/7',1,24,NULL,NULL,NULL),
+(3222,980,'gi0/0/8',1,24,NULL,NULL,NULL),
+(3223,980,'gi0/0/9',1,24,NULL,NULL,NULL),
+(3224,980,'gi0/0/10',1,24,NULL,NULL,NULL),
+(3225,980,'gi0/0/11',1,24,NULL,NULL,NULL),
+(3226,980,'gi0/0/12',1,24,NULL,NULL,NULL),
+(3227,980,'gi0/0/13',1,24,NULL,NULL,NULL),
+(3228,980,'gi0/0/14',1,24,NULL,NULL,NULL),
+(3229,980,'gi0/0/15',1,24,NULL,NULL,NULL),
+(3230,980,'gi0/0/16',1,24,NULL,NULL,NULL),
+(3231,980,'gi0/0/17',1,24,NULL,NULL,NULL),
+(3232,980,'gi0/0/18',1,24,NULL,NULL,NULL),
+(3233,980,'gi0/0/19',1,24,NULL,NULL,NULL),
+(3234,980,'gi0/0/20',1,24,NULL,NULL,NULL),
+(3235,980,'gi0/0/21',1,24,NULL,NULL,NULL),
+(3236,980,'gi0/0/22',1,24,NULL,NULL,NULL),
+(3237,980,'gi0/0/23',1,24,NULL,NULL,NULL),
+(3238,980,'gi0/0/24',1,24,NULL,NULL,NULL),
+(3239,980,'gi0/0/25',1,24,NULL,NULL,NULL),
+(3240,980,'gi0/0/26',1,24,NULL,NULL,NULL),
+(3241,980,'gi0/0/27',1,24,NULL,NULL,NULL),
+(3242,980,'gi0/0/28',1,24,NULL,NULL,NULL),
+(3243,980,'gi0/0/29',1,24,NULL,NULL,NULL),
+(3244,980,'gi0/0/30',1,24,NULL,NULL,NULL),
+(3245,980,'gi0/0/31',1,24,NULL,NULL,NULL),
+(3246,980,'gi0/0/32',1,24,NULL,NULL,NULL),
+(3247,980,'gi0/0/33',1,24,NULL,NULL,NULL),
+(3248,980,'gi0/0/34',1,24,NULL,NULL,NULL),
+(3249,980,'gi0/0/35',1,24,NULL,NULL,NULL),
+(3250,980,'gi0/0/36',1,24,NULL,NULL,NULL),
+(3251,980,'gi0/0/37',1,24,NULL,NULL,NULL),
+(3252,980,'gi0/0/38',1,24,NULL,NULL,NULL),
+(3253,980,'gi0/0/39',1,24,NULL,NULL,NULL),
+(3254,980,'gi0/0/40',1,24,NULL,NULL,NULL),
+(3255,980,'gi0/0/41',1,24,NULL,NULL,NULL),
+(3256,980,'gi0/0/42',1,24,NULL,NULL,NULL),
+(3257,980,'gi0/0/43',1,24,NULL,NULL,NULL),
+(3258,980,'gi0/0/44',1,24,NULL,NULL,NULL),
+(3259,980,'gi0/0/45',1,24,NULL,NULL,NULL),
+(3260,980,'gi0/0/46',1,24,NULL,NULL,NULL),
+(3261,980,'gi0/0/47',1,24,NULL,NULL,NULL),
+(3262,980,'gi0/0/48',1,24,NULL,NULL,NULL),
+(3263,981,'gi0/1',1,24,NULL,NULL,NULL),
+(3264,981,'gi0/2',1,24,NULL,NULL,NULL),
+(3265,981,'gi0/3',1,24,NULL,NULL,NULL),
+(3266,981,'gi0/4',1,24,NULL,NULL,NULL),
+(3267,981,'gi0/5',1,24,NULL,NULL,NULL),
+(3268,981,'gi0/6',1,24,NULL,NULL,NULL),
+(3269,981,'gi0/7',1,24,NULL,NULL,NULL),
+(3270,981,'gi0/8',1,24,NULL,NULL,NULL),
+(3271,981,'gi0/9',1,24,NULL,NULL,NULL),
+(3272,981,'gi0/10',1,24,NULL,NULL,NULL),
+(3273,981,'gi0/11',1,24,NULL,NULL,NULL),
+(3274,981,'gi0/12',1,24,NULL,NULL,NULL);
 
 INSERT INTO `Link` (`porta`, `portb`) VALUES
 (3057,3071),
index fa55b2f..e13b28a 100644 (file)
@@ -1716,7 +1716,7 @@ function commitAddPortReal ($object_id, $port_name, $iif_id, $oif_id, $port_labe
                (
                        'name' => $port_name,
                        'object_id' => $object_id,
-                       'label' => $port_label,
+                       'label' => nullIfEmptyStr ($port_label),
                        'iif_id' => $iif_id,
                        'type' => $oif_id,
                        'l2address' => nullIfEmptyStr ($db_l2address),
@@ -1767,7 +1767,7 @@ function commitUpdatePortReal ($object_id, $port_id, $port_name, $iif_id, $oif_i
                        'name' => $port_name,
                        'iif_id' => $iif_id,
                        'type' => $oif_id,
-                       'label' => $port_label,
+                       'label' => nullIfEmptyStr ($port_label),
                        'reservation_comment' => $port_reservation_comment,
                        'l2address' => nullIfEmptyStr ($db_l2address),
                ),
index d5bc22b..101efa3 100644 (file)
@@ -1226,6 +1226,7 @@ ENDOFTRIGGER;
                        break;
                // FIXME: add remaining 0.20.x sections here after respective releases come out
                case '0.21.0':
+                       $query[] = "UPDATE Port SET label = NULL WHERE label = ''";
                        $query[] = "UPDATE Config SET varvalue = '0.21.0' WHERE varname = 'DB_VERSION'";
                        break;
                case 'dictionary':