[GitHub] incubator-trafficcontrol issue #392: Change TO monitoring.json to raw SQL

2017-03-21 Thread PSUdaemon
Github user PSUdaemon commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/392
  
I think if you use 
http://search.cpan.org/~timb/DBI-1.636/DBI.pm#fetchrow_hashref and alias the 
columns in the query, you will get a $row that you can push right to the array.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol issue #391: Switch stats endpoint to raw sql query ...

2017-03-21 Thread PSUdaemon
Github user PSUdaemon commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/391
  
I think if you use 
http://search.cpan.org/~timb/DBI-1.636/DBI.pm#fetchrow_hashref and alias the 
columns in the query, you will get a $row that you can append right to the 
array.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol issue #278: New Overview Page

2017-02-13 Thread PSUdaemon
Github user PSUdaemon commented on the issue:

https://github.com/apache/incubator-trafficcontrol/pull/278
  
It would be really cool if we could figure out how to use SVGs instead of 
PNGs.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #181: [TC-96] - adds group_by to dbix ...

2017-01-16 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/181#discussion_r96341728
  
--- Diff: traffic_ops/app/lib/API/Cdn.pm ---
@@ -264,7 +264,8 @@ sub get_traffic_monitor_config {
{ 'cdn.name' => $cdn_name },
{   prefetch => ['cdn', 'profile', 'type'],
select   => 'me.profile',
-   distinct => 1
+   distinct => 1,
--- End diff --

All this distinct business makes me 😞 .


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #167: Refactor and cleanup the influxd...

2017-01-10 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/167#discussion_r95498458
  
--- Diff: traffic_stats/influxdb_tools/sync/sync_test.go ---
@@ -0,0 +1,230 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package main
+
+import (
+   "encoding/json"
+   "fmt"
+   "testing"
+
+   influx "github.com/influxdata/influxdb/client/v2"
+   "github.com/influxdata/influxdb/models"
+   . "github.com/smartystreets/goconvey/convey"
--- End diff --

I'm deferring to @rob05c and @dewrich on the testing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #167: Refactor and cleanup the influxd...

2017-01-08 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/167#discussion_r95100817
  
--- Diff: traffic_stats/influxdb_tools/sync/sync_test.go ---
@@ -0,0 +1,230 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package main
+
+import (
+   "encoding/json"
+   "fmt"
+   "testing"
+
+   influx "github.com/influxdata/influxdb/client/v2"
+   "github.com/influxdata/influxdb/models"
+   . "github.com/smartystreets/goconvey/convey"
--- End diff --

I think @dewrich and @rob05c should weigh in here too. If using a framework 
like this means we get more people to contribute tests, I think that's 
something we should take into consideration too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #167: Refactor and cleanup the influxd...

2017-01-08 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/167#discussion_r95100599
  
--- Diff: traffic_stats/influxdb_tools/create/create_ts_databases.go ---
@@ -20,45 +20,81 @@ under the License.
 package main
 
 import (
-   "flag"
"fmt"
-   "os"
 
influx "github.com/influxdata/influxdb/client/v2"
+   "github.com/pkg/errors"
+   "github.com/urfave/cli"
 )
 
-func main() {
+const (
+   cache   = "cache_stats"
+   deliveryService = "deliveryservice_stats"
+   daily   = "daily_stats"
+)
+
+func createFlags() []cli.Flag {
+   return []cli.Flag{
+   cli.StringFlag{
+   Name:  "url",
+   Usage: "The influxdb url and port",
+   Value: "http://localhost:8086;,
+   },
+   cli.IntFlag{
+   Name:  "replication",
+   Usage: "The number of nodes in the cluster",
+   Value: 3,
+   },
+   cli.StringFlag{
+   Name:  "user",
+   Usage: "The influxdb username used to create DBs",
+   Value: "",
+   },
+   cli.StringFlag{
+   Name:  "password",
+   Usage: "The influxdb password used to create DBs",
+   Value: "",
+   },
+   }
+}
+
+func create(c *cli.Context) error {
+   influxURL := c.String("url")
+   replication := c.Int("replication")
+   user := c.String("user")
+   password := c.String("password")
 
-   influxURL := flag.String("url", "http://localhost:8086;, "The influxdb 
url and port")
-   replication := flag.String("replication", "3", "The number of nodes in 
the cluster")
-   user := flag.String("user", "", "The influxdb username used to create 
DBs")
-   password := flag.String("password", "", "The influxdb password used to 
create DBs")
-   flag.Parse()
-   fmt.Printf("creating datbases for influxUrl: %v with a replication of 
%v using user %s\n", *influxURL, *replication, *user)
+   fmt.Printf("creating datbases for influxUrl: %s with a replication of 
%d using user %s\n", influxURL, replication, user)
client, err := influx.NewHTTPClient(influx.HTTPConfig{
-   Addr: *influxURL,
-   Username: *user,
-   Password: *password,
+   Addr: influxURL,
+   Username: user,
+   Password: password,
})
if err != nil {
-   fmt.Printf("Error creating influx client: %v\n", err)
-   os.Exit(1)
+   return errors.Wrap(err, "Error creating influx client")
}
_, _, err = client.Ping(10)
if err != nil {
-   fmt.Printf("Error creating influx client: %v\n", err)
-   os.Exit(1)
+   return errors.Wrap(err, "Error creating influx client")
}
 
createCacheStats(client, replication)
createDailyStats(client, replication)
createDeliveryServiceStats(client, replication)
+   return nil
 }
 
-func queryDB(client influx.Client, cmd string) (res []influx.Result, err 
error) {
+// queryDB takes a variadic argument for the target database so as to make
+// passing the variable optional, however, if passed, only the first db 
passed
+// in will be used
+func queryDB(client influx.Client, cmd string, dbs ...string) (res 
[]influx.Result, err error) {
+   db := ""
+   if len(dbs) > 0 {
+   db = dbs[0]
--- End diff --

Both. I think `traffic_stats.go` also uses a similar function.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #167: Refactor and cleanup the influxd...

2017-01-08 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/167#discussion_r95099075
  
--- Diff: traffic_stats/influxdb_tools/create/create_ts_databases.go ---
@@ -20,45 +20,81 @@ under the License.
 package main
 
 import (
-   "flag"
"fmt"
-   "os"
 
influx "github.com/influxdata/influxdb/client/v2"
+   "github.com/pkg/errors"
+   "github.com/urfave/cli"
 )
 
-func main() {
+const (
+   cache   = "cache_stats"
+   deliveryService = "deliveryservice_stats"
+   daily   = "daily_stats"
+)
+
+func createFlags() []cli.Flag {
+   return []cli.Flag{
--- End diff --

We aren't shy about taking contributions, so breaking it up into smaller 
more manageable chunks is preferred. That way we can more easily get code 
committed rather than trying to manage different facets of a large PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #167: Refactor and cleanup the influxd...

2017-01-08 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/167#discussion_r95098650
  
--- Diff: traffic_stats/influxdb_tools/create/create_ts_databases.go ---
@@ -20,45 +20,81 @@ under the License.
 package main
 
 import (
-   "flag"
"fmt"
-   "os"
 
influx "github.com/influxdata/influxdb/client/v2"
+   "github.com/pkg/errors"
+   "github.com/urfave/cli"
 )
 
-func main() {
+const (
+   cache   = "cache_stats"
+   deliveryService = "deliveryservice_stats"
+   daily   = "daily_stats"
+)
+
+func createFlags() []cli.Flag {
+   return []cli.Flag{
+   cli.StringFlag{
+   Name:  "url",
+   Usage: "The influxdb url and port",
+   Value: "http://localhost:8086;,
+   },
+   cli.IntFlag{
+   Name:  "replication",
+   Usage: "The number of nodes in the cluster",
+   Value: 3,
+   },
+   cli.StringFlag{
+   Name:  "user",
+   Usage: "The influxdb username used to create DBs",
+   Value: "",
+   },
+   cli.StringFlag{
+   Name:  "password",
+   Usage: "The influxdb password used to create DBs",
+   Value: "",
+   },
+   }
+}
+
+func create(c *cli.Context) error {
+   influxURL := c.String("url")
+   replication := c.Int("replication")
+   user := c.String("user")
+   password := c.String("password")
 
-   influxURL := flag.String("url", "http://localhost:8086;, "The influxdb 
url and port")
-   replication := flag.String("replication", "3", "The number of nodes in 
the cluster")
-   user := flag.String("user", "", "The influxdb username used to create 
DBs")
-   password := flag.String("password", "", "The influxdb password used to 
create DBs")
-   flag.Parse()
-   fmt.Printf("creating datbases for influxUrl: %v with a replication of 
%v using user %s\n", *influxURL, *replication, *user)
+   fmt.Printf("creating datbases for influxUrl: %s with a replication of 
%d using user %s\n", influxURL, replication, user)
client, err := influx.NewHTTPClient(influx.HTTPConfig{
-   Addr: *influxURL,
-   Username: *user,
-   Password: *password,
+   Addr: influxURL,
+   Username: user,
+   Password: password,
})
if err != nil {
-   fmt.Printf("Error creating influx client: %v\n", err)
-   os.Exit(1)
+   return errors.Wrap(err, "Error creating influx client")
}
_, _, err = client.Ping(10)
if err != nil {
-   fmt.Printf("Error creating influx client: %v\n", err)
-   os.Exit(1)
+   return errors.Wrap(err, "Error creating influx client")
}
 
createCacheStats(client, replication)
createDailyStats(client, replication)
createDeliveryServiceStats(client, replication)
+   return nil
 }
 
-func queryDB(client influx.Client, cmd string) (res []influx.Result, err 
error) {
+// queryDB takes a variadic argument for the target database so as to make
+// passing the variable optional, however, if passed, only the first db 
passed
+// in will be used
+func queryDB(client influx.Client, cmd string, dbs ...string) (res 
[]influx.Result, err error) {
+   db := ""
+   if len(dbs) > 0 {
+   db = dbs[0]
--- End diff --

I'm all for reuse of code. There aren't any API contracts we need to adhere 
to. I'd prefer to just fix these outright.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #167: Refactor and cleanup the influxd...

2017-01-08 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/167#discussion_r95098546
  
--- Diff: traffic_stats/influxdb_tools/sync/sync_test.go ---
@@ -0,0 +1,230 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package main
+
+import (
+   "encoding/json"
+   "fmt"
+   "testing"
+
+   influx "github.com/influxdata/influxdb/client/v2"
+   "github.com/influxdata/influxdb/models"
+   . "github.com/smartystreets/goconvey/convey"
--- End diff --

We could definitely use more testing. What does this get us over the built 
in testing framework?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #167: Refactor and cleanup the influxd...

2017-01-07 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/167#discussion_r95070933
  
--- Diff: traffic_stats/influxdb_tools/create/create_ts_databases.go ---
@@ -20,45 +20,81 @@ under the License.
 package main
 
 import (
-   "flag"
"fmt"
-   "os"
 
influx "github.com/influxdata/influxdb/client/v2"
+   "github.com/pkg/errors"
+   "github.com/urfave/cli"
--- End diff --

Why new deps?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #167: Refactor and cleanup the influxd...

2017-01-07 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/167#discussion_r95070929
  
--- Diff: traffic_stats/influxdb_tools/create/create_ts_databases.go ---
@@ -20,45 +20,81 @@ under the License.
 package main
 
 import (
-   "flag"
"fmt"
-   "os"
 
influx "github.com/influxdata/influxdb/client/v2"
+   "github.com/pkg/errors"
+   "github.com/urfave/cli"
 )
 
-func main() {
+const (
+   cache   = "cache_stats"
+   deliveryService = "deliveryservice_stats"
+   daily   = "daily_stats"
+)
+
+func createFlags() []cli.Flag {
+   return []cli.Flag{
--- End diff --

Why clean up other constants, but put this into a function just to return a 
constant?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #167: Refactor and cleanup the influxd...

2017-01-07 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/167#discussion_r95070920
  
--- Diff: traffic_stats/influxdb_tools/create/create_ts_databases.go ---
@@ -20,45 +20,81 @@ under the License.
 package main
 
 import (
-   "flag"
"fmt"
-   "os"
 
influx "github.com/influxdata/influxdb/client/v2"
+   "github.com/pkg/errors"
+   "github.com/urfave/cli"
 )
 
-func main() {
+const (
+   cache   = "cache_stats"
+   deliveryService = "deliveryservice_stats"
+   daily   = "daily_stats"
+)
+
+func createFlags() []cli.Flag {
+   return []cli.Flag{
+   cli.StringFlag{
+   Name:  "url",
+   Usage: "The influxdb url and port",
+   Value: "http://localhost:8086;,
+   },
+   cli.IntFlag{
+   Name:  "replication",
+   Usage: "The number of nodes in the cluster",
+   Value: 3,
+   },
+   cli.StringFlag{
+   Name:  "user",
+   Usage: "The influxdb username used to create DBs",
+   Value: "",
+   },
+   cli.StringFlag{
+   Name:  "password",
+   Usage: "The influxdb password used to create DBs",
+   Value: "",
+   },
+   }
+}
+
+func create(c *cli.Context) error {
+   influxURL := c.String("url")
+   replication := c.Int("replication")
+   user := c.String("user")
+   password := c.String("password")
 
-   influxURL := flag.String("url", "http://localhost:8086;, "The influxdb 
url and port")
-   replication := flag.String("replication", "3", "The number of nodes in 
the cluster")
-   user := flag.String("user", "", "The influxdb username used to create 
DBs")
-   password := flag.String("password", "", "The influxdb password used to 
create DBs")
-   flag.Parse()
-   fmt.Printf("creating datbases for influxUrl: %v with a replication of 
%v using user %s\n", *influxURL, *replication, *user)
+   fmt.Printf("creating datbases for influxUrl: %s with a replication of 
%d using user %s\n", influxURL, replication, user)
client, err := influx.NewHTTPClient(influx.HTTPConfig{
-   Addr: *influxURL,
-   Username: *user,
-   Password: *password,
+   Addr: influxURL,
+   Username: user,
+   Password: password,
})
if err != nil {
-   fmt.Printf("Error creating influx client: %v\n", err)
-   os.Exit(1)
+   return errors.Wrap(err, "Error creating influx client")
}
_, _, err = client.Ping(10)
if err != nil {
-   fmt.Printf("Error creating influx client: %v\n", err)
-   os.Exit(1)
+   return errors.Wrap(err, "Error creating influx client")
}
 
createCacheStats(client, replication)
createDailyStats(client, replication)
createDeliveryServiceStats(client, replication)
+   return nil
 }
 
-func queryDB(client influx.Client, cmd string) (res []influx.Result, err 
error) {
+// queryDB takes a variadic argument for the target database so as to make
+// passing the variable optional, however, if passed, only the first db 
passed
+// in will be used
+func queryDB(client influx.Client, cmd string, dbs ...string) (res 
[]influx.Result, err error) {
+   db := ""
+   if len(dbs) > 0 {
+   db = dbs[0]
--- End diff --

Why take a variadic argument if you will only ever use the first one? This 
seems like you want to have function overloading in a language that doesn't 
support it. It seems more idiomatic to pass a slice that can be empty.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #141: [Please Review] [TC-32] Addition...

2016-12-20 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/141#discussion_r93350171
  
--- Diff: 
traffic_ops/app/lib/Schema/Result/DeliveryServiceInfoForCdnList.pm ---
@@ -0,0 +1,101 @@
+
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+#
+
+package Schema::Result::DeliveryServiceInfoForCdnList;
+
+# this view returns the regexp set for a delivery services, ordered by 
type, set_number.
+# to use, do
+#
+# $rs = $self->db->resultset('DeliveryServiceInfoForCdnList')->search({}, 
{ bind => [ $id ]});
+#
+# where $id is the CDN id.
+
+use strict;
+use warnings;
+use utf8;
+use base 'DBIx::Class::Core';
+
+__PACKAGE__->table_class('DBIx::Class::ResultSource::View');
+
+__PACKAGE__->table("DeliveryServiceInfoForCdnList:");
+
+__PACKAGE__->result_source_instance->is_virtual(1);
+
+__PACKAGE__->result_source_instance->view_definition( "
+SELECT DISTINCT
--- End diff --

Why `DISTINCT`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafficcontrol pull request #131: [TC-66] - Stores, diffs and fetc...

2016-12-09 Thread PSUdaemon
Github user PSUdaemon commented on a diff in the pull request:


https://github.com/apache/incubator-trafficcontrol/pull/131#discussion_r91827151
  
--- Diff: 
traffic_ops/app/db/migrations/2016120800_alter_cdn_name_not_null.sql ---
@@ -0,0 +1,23 @@
+/*
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+-- +goose Up
+-- SQL in section 'Up' is executed when this migration is applied
+ALTER TABLE CDN ALTER COLUMN NAME SET NOT NULL;
+
+-- +goose Down
+-- SQL section 'Down' is executed when this migration is rolled back
+ALTER TABLE CDN ALTER COLUMN NAME SET NULL;
--- End diff --

What is the reason for this?

Does goose support transactional DDL?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---