Commit fa898675 authored by EKbfh's avatar EKbfh 🐼
Browse files

Add migration for playbook url

parent a9d751e1
Pipeline #28407 passed with stages
in 4 minutes and 14 seconds
# Third-party modules
from peewee import CharField, Model
def migrate(migrator):
class Environment(Model):
class Meta(object):
database = migrator.db
db_table = "environment"
name = CharField(unique=True)
config_order = CharField()
if len(Environment.select()) != 0:
for env in Environment.select():
if env.playbook_link == 'git+https://github.com/nocproject/ansible_deploy@microservices':
env.playbook_link = "git+https://github.com/nocproject/noc@stable"
env.save()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment