mitchell852 commented on a change in pull request #2704: TO DB - Mapping roles to capabilities for read-only, operations, portal, federations, steering URL: https://github.com/apache/trafficcontrol/pull/2704#discussion_r212644184
########## File path: traffic_ops/app/db/migrations/20180814000625_remove_two_capabilities_for_reseed.sql ########## @@ -0,0 +1,20 @@ +/* + 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 + +-- we are going to clean up capabilities for a reseed +DELETE FROM api_capability WHERE capability = 'cdns-read' OR capability LIKE 'params%'; Review comment: i think rather than doing a delete, you need to do an update...because the order for db/admin.pl upgrade is - migrate(up) - seed - patch therefore, you'll have failures in your next migration if you delete these capabilities...i think... ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
